From 96ae4da9bd08528638a7de9f1a3edc20d6cb88c6 Mon Sep 17 00:00:00 2001 From: Moony Date: Sat, 16 Jul 2022 21:50:57 -0500 Subject: [PATCH] Add a log to cut cables. How did this not exist before? (#9780) --- Content.Server/Power/EntitySystems/CableSystem.cs | 5 +++++ Content.Shared.Database/LogType.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Server/Power/EntitySystems/CableSystem.cs b/Content.Server/Power/EntitySystems/CableSystem.cs index d8336ac701..24fc7c93ad 100644 --- a/Content.Server/Power/EntitySystems/CableSystem.cs +++ b/Content.Server/Power/EntitySystems/CableSystem.cs @@ -1,7 +1,9 @@ +using Content.Server.Administration.Logs; using Content.Server.Electrocution; using Content.Server.Power.Components; using Content.Server.Stack; using Content.Server.Tools; +using Content.Shared.Database; using Content.Shared.Interaction; using Robust.Shared.Map; @@ -14,6 +16,7 @@ public sealed partial class CableSystem : EntitySystem [Dependency] private readonly ToolSystem _toolSystem = default!; [Dependency] private readonly StackSystem _stack = default!; [Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!; + [Dependency] private readonly IAdminLogManager _adminLogs = default!; public override void Initialize() { @@ -42,6 +45,8 @@ public sealed partial class CableSystem : EntitySystem if (_electrocutionSystem.TryDoElectrifiedAct(uid, args.User)) 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); QueueDel(uid); } diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs index 6ca7c7eaa2..ca46b84a19 100644 --- a/Content.Shared.Database/LogType.cs +++ b/Content.Shared.Database/LogType.cs @@ -73,5 +73,6 @@ public enum LogType // haha so funny Emag = 69, Gib = 70, - Identity = 71 + Identity = 71, + CableCut = 72, }