Add logs to recycler gibbing and broadcasting. (#26008)

* 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>
This commit is contained in:
nikthechampiongr
2024-03-12 12:57:05 +02:00
committed by GitHub
parent dc0e4ada62
commit 2b8415b378
3 changed files with 8 additions and 0 deletions

View 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)