]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Log radial menu interractions for the RCD, Issue #40902 (#40986)
authorJesterX666 <32009105+JesterX666@users.noreply.github.com>
Wed, 5 Nov 2025 03:23:43 +0000 (22:23 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Nov 2025 03:23:43 +0000 (03:23 +0000)
* Log radial menu interractions,  Issue #40902

* code review adjustement

* Asked modifications from code review

* Update Content.Shared/RCD/Systems/RCDSystem.cs

Yeah, I'm old and using a very old C# syntax :D  I need to update my brain

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.Shared/RCD/Systems/RCDSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Shared/RCD/Systems/RCDSystem.cs

index 6cce0b6204c8ab257fa242c6e7ed2a74574bbecf..504576216ac4b0f728d247285c67d03020f70085 100644 (file)
@@ -1,5 +1,4 @@
 using Content.Shared.Administration.Logs;
-using Content.Shared.Charges.Components;
 using Content.Shared.Charges.Systems;
 using Content.Shared.Construction;
 using Content.Shared.Database;
@@ -89,11 +88,14 @@ public sealed class RCDSystem : EntitySystem
         if (!component.AvailablePrototypes.Contains(args.ProtoId))
             return;
 
-        if (!_protoManager.HasIndex(args.ProtoId))
+        if (!_protoManager.Resolve<RCDPrototype>(args.ProtoId, out var prototype))
             return;
 
         // Set the current RCD prototype to the one supplied
         component.ProtoId = args.ProtoId;
+
+        _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{args.Actor} set RCD mode to: {prototype.Mode} : {prototype.Prototype}");
+
         Dirty(uid, component);
     }