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:
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Content.Server.GameObjects.Components.Interactable;
|
using Content.Server.GameObjects.Components.Interactable;
|
||||||
using Content.Server.GameObjects.Components.Power;
|
using Content.Server.GameObjects.Components.Power;
|
||||||
@@ -225,6 +225,19 @@ namespace Content.Server.GameObjects.Components.Doors
|
|||||||
if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
|
if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
|
||||||
return false;
|
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 (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Prying)) return false;
|
||||||
|
|
||||||
if (IsPowered())
|
if (IsPowered())
|
||||||
|
|||||||
Reference in New Issue
Block a user