From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Sat, 20 Dec 2025 18:11:07 +0000 (+0100) Subject: Log Station AI radial actions (#41911) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=e2ef727096a141706fbdf217d3ec24698731f0c0;p=space-station-14.git Log Station AI radial actions (#41911) * fuck you and your anonymous zombie shocking * ToUglyString * because --- diff --git a/Content.Shared/Silicons/StationAi/SharedStationAiSystem.Airlock.cs b/Content.Shared/Silicons/StationAi/SharedStationAiSystem.Airlock.cs index 2bf1ddc3bf..f11cba419e 100644 --- a/Content.Shared/Silicons/StationAi/SharedStationAiSystem.Airlock.cs +++ b/Content.Shared/Silicons/StationAi/SharedStationAiSystem.Airlock.cs @@ -1,3 +1,5 @@ +using Content.Shared.Administration.Logs; +using Content.Shared.Database; using Content.Shared.Doors.Components; using Robust.Shared.Serialization; using Content.Shared.Electrocution; @@ -7,6 +9,8 @@ namespace Content.Shared.Silicons.StationAi; // Handles airlock radial public abstract partial class SharedStationAiSystem { + [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; + private void InitializeAirlock() { SubscribeLocalEvent(OnAirlockBolt); @@ -22,20 +26,30 @@ public abstract partial class SharedStationAiSystem if (component.BoltWireCut || !PowerReceiver.IsPowered(ent)) { ShowDeviceNotRespondingPopup(args.User); + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change bolt status on {ent} to [{args.Bolted}] using the Station AI radial because it was unpowered."); return; } if (!_access.IsAllowed(args.User, ent)) { ShowDeviceNoAccessPopup(args.User); + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change bolt status on {ent} to [{args.Bolted}] using the Station AI radial because they had no access."); return; } var setResult = _doors.TrySetBoltDown((ent, component), args.Bolted, args.User, predicted: true); if (!setResult) { + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change bolt status on {ent} to [{args.Bolted}] using the Station AI radial."); ShowDeviceNotRespondingPopup(args.User); } + else + { + _adminLogger.Add(LogType.Action, $"{args.User} set bolt status on {ent} to [{args.Bolted}] using the Station AI radial."); + } } /// @@ -46,16 +60,21 @@ public abstract partial class SharedStationAiSystem if (!PowerReceiver.IsPowered(ent)) { ShowDeviceNotRespondingPopup(args.User); + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change emergency access status on {ent} to [{args.EmergencyAccess}] using the Station AI radial because it was unpowered."); return; } if (!_access.IsAllowed(args.User, ent)) { ShowDeviceNoAccessPopup(args.User); + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change emergency access status on {ent} to [{args.EmergencyAccess}] using the Station AI radial because they had no access."); return; } _airlocks.SetEmergencyAccess((ent, component), args.EmergencyAccess, args.User, predicted: true); + _adminLogger.Add(LogType.Action, $"{args.User} set emergency access status on {ent} to [{args.EmergencyAccess}] using the Station AI radial."); } /// @@ -66,15 +85,20 @@ public abstract partial class SharedStationAiSystem if (component.IsWireCut || !PowerReceiver.IsPowered(ent)) { ShowDeviceNotRespondingPopup(args.User); + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change electrified status on {ent} to [{args.Electrified}] using the Station AI radial because it was unpowered."); return; } if (!_access.IsAllowed(args.User, ent)) { ShowDeviceNoAccessPopup(args.User); + _adminLogger.Add(LogType.Action, + $"{args.User} was unable to change electrified status on {ent} to [{args.Electrified}] using the Station AI radial because they had no access."); return; } + _adminLogger.Add(LogType.Action, $"{args.User} set electrified status on {ent} to [{args.Electrified}] using the Station AI radial."); _electrify.SetElectrified((ent, component), args.Electrified); var soundToPlay = component.Enabled ? component.AirlockElectrifyDisabled