]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Convert a few debugging commands and the mapping setup command to LEC. (#38589)
authorKyle Tyo <36606155+VerinSenpai@users.noreply.github.com>
Mon, 28 Jul 2025 16:29:15 +0000 (12:29 -0400)
committerGitHub <noreply@github.com>
Mon, 28 Jul 2025 16:29:15 +0000 (18:29 +0200)
* commit

* Update MappingClientSideSetupCommand.cs

* missed a spot

* Update MappingClientSideSetupCommand.cs

* whoopos

* Update mappingclientsidesetup-command.ftl

Content.Client/Commands/DebugCommands.cs
Content.Client/Commands/MappingClientSideSetupCommand.cs
Resources/Locale/en-US/commands/mappingclientsidesetup-command.ftl [moved from Resources/Locale/en-US/commands/mapping-client-side-setup-command.ftl with 65% similarity]

index c4aa8847e4a84efc9297a031f66e08744f006912..ec9f74526e4b0e1079e5e019ae7277c9f22edf7c 100644 (file)
@@ -1,53 +1,42 @@
 using Content.Client.Markers;
 using Content.Client.Popups;
 using Content.Client.SubFloor;
-using Content.Shared.SubFloor;
-using Robust.Client.GameObjects;
 using Robust.Shared.Console;
-using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
 
 namespace Content.Client.Commands;
 
-internal sealed class ShowMarkersCommand : LocalizedCommands
+internal sealed class ShowMarkersCommand : LocalizedEntityCommands
 {
-    [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
+    [Dependency] private readonly MarkerSystem _markerSystem = default!;
 
     public override string Command => "showmarkers";
 
-    public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
-
     public override void Execute(IConsoleShell shell, string argStr, string[] args)
     {
-        _entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible ^= true;
+        _markerSystem.MarkersVisible ^= true;
     }
 }
 
-internal sealed class ShowSubFloor : LocalizedCommands
+internal sealed class ShowSubFloor : LocalizedEntityCommands
 {
-    [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
+    [Dependency] private readonly SubFloorHideSystem _subfloorSystem = default!;
 
     public override string Command => "showsubfloor";
 
-    public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
-
     public override void Execute(IConsoleShell shell, string argStr, string[] args)
     {
-        _entitySystemManager.GetEntitySystem<SubFloorHideSystem>().ShowAll ^= true;
+        _subfloorSystem.ShowAll ^= true;
     }
 }
 
-internal sealed class NotifyCommand : LocalizedCommands
+internal sealed class NotifyCommand : LocalizedEntityCommands
 {
-    [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
+    [Dependency] private readonly PopupSystem _popupSystem = default!;
 
     public override string Command => "notify";
 
-    public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
-
     public override void Execute(IConsoleShell shell, string argStr, string[] args)
     {
-        var message = args[0];
-
-        _entitySystemManager.GetEntitySystem<PopupSystem>().PopupCursor(message);
+        _popupSystem.PopupCursor(args[0]);
     }
 }
index 99a8ba00fe21949fdd35274de94d0763a3b19885..70a383b5f6efbda9fec6e5dd2742b24685fe0eaa 100644 (file)
@@ -1,32 +1,29 @@
 using Content.Client.Actions;
-using Content.Client.Mapping;
 using Content.Client.Markers;
-using JetBrains.Annotations;
+using Content.Client.SubFloor;
 using Robust.Client.Graphics;
-using Robust.Client.State;
 using Robust.Shared.Console;
 
 namespace Content.Client.Commands;
 
-[UsedImplicitly]
-internal sealed class MappingClientSideSetupCommand : LocalizedCommands
+internal sealed class MappingClientSideSetupCommand : LocalizedEntityCommands
 {
-    [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
     [Dependency] private readonly ILightManager _lightManager = default!;
+    [Dependency] private readonly ActionsSystem _actionSystem = default!;
+    [Dependency] private readonly MarkerSystem _markerSystem = default!;
+    [Dependency] private readonly SubFloorHideSystem _subfloorSystem = default!;
 
     public override string Command => "mappingclientsidesetup";
 
-    public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
-
     public override void Execute(IConsoleShell shell, string argStr, string[] args)
     {
-        if (!_lightManager.LockConsoleAccess)
-        {
-            _entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible = true;
-            _lightManager.Enabled = false;
-            shell.ExecuteCommand("showsubfloor");
-            _entitySystemManager.GetEntitySystem<ActionsSystem>().LoadActionAssignments("/mapping_actions.yml", false);
-        }
+        if (_lightManager.LockConsoleAccess)
+            return;
+
+        _markerSystem.MarkersVisible = true;
+        _lightManager.Enabled = false;
+        _subfloorSystem.ShowAll = true;
+        _actionSystem.LoadActionAssignments("/mapping_actions.yml", false);
     }
 }
 
similarity index 65%
rename from Resources/Locale/en-US/commands/mapping-client-side-setup-command.ftl
rename to Resources/Locale/en-US/commands/mappingclientsidesetup-command.ftl
index 955d077db451874c27c1286928b248aeb251b776..24a7aa3d11c218d71481fff2186609415e5aca43 100644 (file)
@@ -1,2 +1,2 @@
 cmd-mappingclientsidesetup-desc = Sets up the lighting control and such settings client-side. Sent by 'mapping' to client.
-cmd-mappingclientsidesetup-help = Usage: {$command}
\ No newline at end of file
+cmd-mappingclientsidesetup-help = Usage: mappingclientsidesetup