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); }