Adds hacking UI pop-up when using a hacking tool on an open panel (#1100)

Co-authored-by: Bright0 <nsmoaksmoakna@gmail.com>
This commit is contained in:
Bright0
2020-06-12 10:51:30 -06:00
committed by GitHub
parent 3cedcaf004
commit 4b9a6c18fe

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using Content.Server.GameObjects.Components.Interactable;
using Content.Server.GameObjects.Components.Power;
@@ -225,6 +225,19 @@ namespace Content.Server.GameObjects.Components.Doors
if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
return false;
if (tool.HasQuality(ToolQuality.Cutting)
|| tool.HasQuality(ToolQuality.Multitool))
{
if (_wires.IsPanelOpen)
{
if (eventArgs.User.TryGetComponent(out IActorComponent actor))
{
_wires.OpenInterface(actor.playerSession);
return true;
}
}
}
if (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Prying)) return false;
if (IsPowered())