]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add logs to recycler gibbing and broadcasting. (#26008)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Tue, 12 Mar 2024 10:57:05 +0000 (12:57 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Mar 2024 10:57:05 +0000 (03:57 -0700)
* Add logs to things

* Make the message log be saved as msg because I forgor before.

* Log fails when getting an entity that doesn't exist

---------

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Content.Server/Communications/CommunicationsConsoleSystem.cs
Content.Server/Materials/MaterialReclaimerSystem.cs
Content.Shared.Database/LogType.cs

index 6b0b13c410eae6219c62b5cc3a599f866ad9ea9c..6b745c8cd95e9783140927662579150ea772efd7 100644 (file)
@@ -303,6 +303,9 @@ namespace Content.Server.Communications
             };
 
             _deviceNetworkSystem.QueuePacket(uid, null, payload, net.TransmitFrequency);
+
+            if (message.Session.AttachedEntity != null)
+                _adminLogger.Add(LogType.DeviceNetwork, LogImpact.Low, $"{ToPrettyString(message.Session.AttachedEntity.Value):player} has sent the following broadcast: {message.Message:msg}");
         }
 
         private void OnCallShuttleMessage(EntityUid uid, CommunicationsConsoleComponent comp, CommunicationsConsoleCallEmergencyShuttleMessage message)
index c976543f7ca9b39dd4a196fced6b2e285a6ce6b8..8920daf60d01851bd0c667fb58f8bf8678b51ca1 100644 (file)
@@ -19,6 +19,8 @@ using Robust.Server.GameObjects;
 using Robust.Shared.Player;
 using Robust.Shared.Utility;
 using System.Linq;
+using Content.Server.Administration.Logs;
+using Content.Shared.Database;
 
 namespace Content.Server.Materials;
 
@@ -35,6 +37,7 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
     [Dependency] private readonly PuddleSystem _puddle = default!;
     [Dependency] private readonly StackSystem _stack = default!;
     [Dependency] private readonly SharedMindSystem _mind = default!;
+    [Dependency] private readonly IAdminLogManager _adminLogger = default!;
 
     /// <inheritdoc/>
     public override void Initialize()
@@ -154,6 +157,7 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
 
         if (CanGib(uid, item, component))
         {
+            _adminLogger.Add(LogType.Gib, LogImpact.Extreme, $"{ToPrettyString(item):victim} was gibbed by {ToPrettyString(uid):entity} ");
             SpawnChemicalsFromComposition(uid, item, completion, false, component, xform);
             _body.GibBody(item, true);
             _appearance.SetData(uid, RecyclerVisuals.Bloody, true);
index b3cdc6020989511a874270863e4fcbba06ebf367..ece6607954e377cd00d9b1e7a06e78c7386b0ecf 100644 (file)
@@ -95,4 +95,5 @@ public enum LogType
     /// </summary>
     ChatRateLimited = 87,
     AtmosTemperatureChanged = 88,
+    DeviceNetwork = 89,
 }