Add a log to cut cables. How did this not exist before? (#9780)

This commit is contained in:
Moony
2022-07-16 21:50:57 -05:00
committed by GitHub
parent a42ef0b8e4
commit 96ae4da9bd
2 changed files with 7 additions and 1 deletions

View File

@@ -1,7 +1,9 @@
using Content.Server.Administration.Logs;
using Content.Server.Electrocution; using Content.Server.Electrocution;
using Content.Server.Power.Components; using Content.Server.Power.Components;
using Content.Server.Stack; using Content.Server.Stack;
using Content.Server.Tools; using Content.Server.Tools;
using Content.Shared.Database;
using Content.Shared.Interaction; using Content.Shared.Interaction;
using Robust.Shared.Map; using Robust.Shared.Map;
@@ -14,6 +16,7 @@ public sealed partial class CableSystem : EntitySystem
[Dependency] private readonly ToolSystem _toolSystem = default!; [Dependency] private readonly ToolSystem _toolSystem = default!;
[Dependency] private readonly StackSystem _stack = default!; [Dependency] private readonly StackSystem _stack = default!;
[Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!; [Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!;
[Dependency] private readonly IAdminLogManager _adminLogs = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -42,6 +45,8 @@ public sealed partial class CableSystem : EntitySystem
if (_electrocutionSystem.TryDoElectrifiedAct(uid, args.User)) if (_electrocutionSystem.TryDoElectrifiedAct(uid, args.User))
return; return;
_adminLogs.Add(LogType.CableCut, LogImpact.Medium, $"The {ToPrettyString(uid)} at {Transform(uid).Coordinates} was cut by {ToPrettyString(args.User)}.");
Spawn(cable.CableDroppedOnCutPrototype, Transform(uid).Coordinates); Spawn(cable.CableDroppedOnCutPrototype, Transform(uid).Coordinates);
QueueDel(uid); QueueDel(uid);
} }

View File

@@ -73,5 +73,6 @@ public enum LogType
// haha so funny // haha so funny
Emag = 69, Emag = 69,
Gib = 70, Gib = 70,
Identity = 71 Identity = 71,
CableCut = 72,
} }