From ff7713eceaac2b9439528643f41c69ce4c243a8d Mon Sep 17 00:00:00 2001 From: B_Kirill <153602297+B-Kirill@users.noreply.github.com> Date: Fri, 25 Jul 2025 22:01:37 +1000 Subject: [PATCH] Admin logs for batteries UI (#39208) --- .../Power/EntitySystems/BatteryInterfaceSystem.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/Power/EntitySystems/BatteryInterfaceSystem.cs b/Content.Server/Power/EntitySystems/BatteryInterfaceSystem.cs index 6ce19cfaf6..33e3f8ff2c 100644 --- a/Content.Server/Power/EntitySystems/BatteryInterfaceSystem.cs +++ b/Content.Server/Power/EntitySystems/BatteryInterfaceSystem.cs @@ -1,4 +1,6 @@ -using Content.Server.Power.Components; +using Content.Server.Administration.Logs; +using Content.Server.Power.Components; +using Content.Shared.Database; using Content.Shared.Power; using Robust.Server.GameObjects; @@ -19,6 +21,7 @@ namespace Content.Server.Power.EntitySystems; /// public sealed class BatteryInterfaceSystem : EntitySystem { + [Dependency] private readonly IAdminLogManager _adminLog = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = null!; public override void Initialize() @@ -43,12 +46,16 @@ public sealed class BatteryInterfaceSystem : EntitySystem { var netBattery = Comp(ent); netBattery.CanCharge = args.On; + + _adminLog.Add(LogType.Action,$"{ToPrettyString(args.Actor):actor} set input breaker to {args.On} on {ToPrettyString(ent):target}"); } private void HandleSetOutputBreaker(Entity ent, ref BatterySetOutputBreakerMessage args) { var netBattery = Comp(ent); netBattery.CanDischarge = args.On; + + _adminLog.Add(LogType.Action,$"{ToPrettyString(args.Actor):actor} set output breaker to {args.On} on {ToPrettyString(ent):target}"); } private void HandleSetChargeRate(Entity ent, ref BatterySetChargeRateMessage args) -- 2.51.2