From e92b48c1fa90b95bf694feeba2d2bc97618f2efe Mon Sep 17 00:00:00 2001 From: OnyxTheBrave <131422822+OnyxTheBrave@users.noreply.github.com> Date: Tue, 14 Oct 2025 18:30:27 -0500 Subject: [PATCH] Logging for turret controller (#40884) * Logging for turret controller * Wording * MEDIUM * changed to use ItemConfigure --- .../DeployableTurretControllerSystem.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Content.Server/TurretController/DeployableTurretControllerSystem.cs b/Content.Server/TurretController/DeployableTurretControllerSystem.cs index f0b6881431..fbb802b679 100644 --- a/Content.Server/TurretController/DeployableTurretControllerSystem.cs +++ b/Content.Server/TurretController/DeployableTurretControllerSystem.cs @@ -9,6 +9,8 @@ using Content.Shared.Turrets; using Robust.Server.GameObjects; using Robust.Shared.Prototypes; using System.Linq; +using Content.Server.Administration.Logs; +using Content.Shared.Database; namespace Content.Server.TurretController; @@ -17,6 +19,7 @@ public sealed partial class DeployableTurretControllerSystem : SharedDeployableT { [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; [Dependency] private readonly DeviceNetworkSystem _deviceNetwork = default!; + [Dependency] private readonly IAdminLogManager _adminLogger = default!; /// Keys for the device network. See for further examples. public const string CmdSetArmamemtState = "set_armament_state"; @@ -109,6 +112,8 @@ public sealed partial class DeployableTurretControllerSystem : SharedDeployableT [CmdSetArmamemtState] = armamentState, }; + _adminLogger.Add(LogType.ItemConfigure, LogImpact.Medium, $"{ToPrettyString(user)} set {ToPrettyString(ent)} to {armamentState}"); + _deviceNetwork.QueuePacket(ent, null, payload, device: device); } @@ -132,6 +137,11 @@ public sealed partial class DeployableTurretControllerSystem : SharedDeployableT [CmdSetAccessExemptions] = turretTargetingSettings.ExemptAccessLevels, }; + foreach (var exemption in exemptions) + { + _adminLogger.Add(LogType.ItemConfigure, LogImpact.Medium, $"{ToPrettyString(user)} set {ToPrettyString(ent)} authorization of {exemption} to {enabled}"); + } + _deviceNetwork.QueuePacket(ent, null, payload, device: device); }