diff --git a/Content.Client/Commands/MappingClientSideSetupCommand.cs b/Content.Client/Commands/MappingClientSideSetupCommand.cs new file mode 100644 index 0000000000..a90afc5b9c --- /dev/null +++ b/Content.Client/Commands/MappingClientSideSetupCommand.cs @@ -0,0 +1,34 @@ +using JetBrains.Annotations; +using System; +using Content.Client.Markers; +using Robust.Client.Graphics; +using Robust.Shared.Console; +using Robust.Shared.GameObjects; + +namespace Content.Client.Commands; + +/// +/// Sent by mapping command to client. +/// This is because the debug commands for some of these options are on toggles. +/// +[UsedImplicitly] +internal sealed class MappingClientSideSetupCommand : IConsoleCommand +{ + // ReSharper disable once StringLiteralTypo + public string Command => "mappingclientsidesetup"; + public string Description => "Sets up the lighting control and such settings client-side. Sent by 'mapping' to client."; + public string Help => ""; + + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + var mgr = IoCManager.Resolve(); + if (!mgr.LockConsoleAccess) + { + EntitySystem.Get().MarkersVisible = true; + mgr.Enabled = false; + shell.ExecuteCommand("showsubfloorforever"); + shell.ExecuteCommand("loadmapacts"); + } + } +} + diff --git a/Content.Server/GameTicking/Commands/MappingCommand.cs b/Content.Server/GameTicking/Commands/MappingCommand.cs index 82b07bccee..88538893e0 100644 --- a/Content.Server/GameTicking/Commands/MappingCommand.cs +++ b/Content.Server/GameTicking/Commands/MappingCommand.cs @@ -85,10 +85,7 @@ namespace Content.Server.GameTicking.Commands shell.ExecuteCommand("sudo cvar events.enabled false"); shell.ExecuteCommand($"tp 0 0 {mapId}"); - shell.RemoteExecuteCommand("showmarkers"); - shell.RemoteExecuteCommand("togglelight"); - shell.RemoteExecuteCommand("showsubfloorforever"); - shell.RemoteExecuteCommand("loadmapacts"); + shell.RemoteExecuteCommand("mappingclientsidesetup"); mapManager.SetMapPaused(mapId, true); if (args.Length == 2)