]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
More fax logging (#25911)
authorDeatherd <69344159+Deatherd@users.noreply.github.com>
Wed, 13 Mar 2024 09:03:12 +0000 (12:03 +0300)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2024 09:03:12 +0000 (20:03 +1100)
* More fax logging

* Update Content.Server/Fax/FaxSystem.cs

Also logging if no author for some reason

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
* Update Content.Server/Fax/FaxSystem.cs

* Update Content.Server/Fax/FaxSystem.cs

* Update Content.Server/Fax/FaxSystem.cs

* Update Content.Server/Fax/FaxSystem.cs

---------

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Content.Server/Fax/FaxSystem.cs

index 265a20ce1c9337703ca1feb033dbd5413436986d..3ff139466f5c5484b8ea0e8fca9b74928630913a 100644 (file)
@@ -313,7 +313,7 @@ public sealed class FaxSystem : EntitySystem
 
     private void OnCopyButtonPressed(EntityUid uid, FaxMachineComponent component, FaxCopyMessage args)
     {
-        Copy(uid, component);
+        Copy(uid, component, args);
     }
 
     private void OnSendButtonPressed(EntityUid uid, FaxMachineComponent component, FaxSendMessage args)
@@ -416,13 +416,20 @@ public sealed class FaxSystem : EntitySystem
         component.SendTimeoutRemaining += component.SendTimeout;
 
         UpdateUserInterface(uid, component);
+
+        if (args.Session.AttachedEntity != null)
+            _adminLogger.Add(LogType.Action, LogImpact.Low,
+                $"{ToPrettyString(args.Session.AttachedEntity.Value):actor} added print job to {ToPrettyString(uid):tool} with text: {args.Content}");
+        else
+            _adminLogger.Add(LogType.Action, LogImpact.Low,
+                $"Someone added print job to {ToPrettyString(uid):tool} with text: {args.Content}");
     }
 
     /// <summary>
     ///     Copies the paper in the fax. A timeout is set after copying,
     ///     which is shared by the send button.
     /// </summary>
-    public void Copy(EntityUid uid, FaxMachineComponent? component = null)
+    public void Copy(EntityUid uid, FaxMachineComponent? component, FaxCopyMessage args)
     {
         if (!Resolve(uid, ref component))
             return;
@@ -449,6 +456,10 @@ public sealed class FaxSystem : EntitySystem
         // will start immediately.
 
         UpdateUserInterface(uid, component);
+
+        if (args.Session.AttachedEntity != null)
+            _adminLogger.Add(LogType.Action, LogImpact.Low,
+                $"{ToPrettyString(args.Session.AttachedEntity.Value):actor} added copy job to {ToPrettyString(uid):tool} with text: {ToPrettyString(component.PaperSlot.Item):subject}");
     }
 
     /// <summary>