DoAfter & misc interaction fixes (#15144)

This commit is contained in:
Leon Friedrich
2023-04-05 12:19:28 +12:00
committed by GitHub
parent f254af53bb
commit b9b8180131
4 changed files with 38 additions and 36 deletions

View File

@@ -463,12 +463,16 @@ public sealed class WiresSystem : SharedWiresSystem
_toolSystem.HasQuality(args.Used, "Pulsing", tool)))
{
if (TryComp(args.User, out ActorComponent? actor))
{
_uiSystem.TryOpen(uid, WiresUiKey.Key, actor.PlayerSession);
args.Handled = true;
}
}
else if (_toolSystem.UseTool(args.Used, args.User, uid, ScrewTime, "Screwing", new WirePanelDoAfterEvent(), toolComponent: tool))
{
_adminLogger.Add(LogType.Action, LogImpact.Low,
$"{ToPrettyString(args.User):user} is screwing {ToPrettyString(uid):target}'s {(panel.Open ? "open" : "closed")} maintenance panel at {Transform(uid).Coordinates:targetlocation}");
args.Handled = true;
}
}