1
0

MappingClientSideSetupCommand.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Client.Actions;
  2. using Content.Client.Mapping;
  3. using Content.Client.Markers;
  4. using JetBrains.Annotations;
  5. using Robust.Client.Graphics;
  6. using Robust.Client.State;
  7. using Robust.Shared.Console;
  8. namespace Content.Client.Commands;
  9. [UsedImplicitly]
  10. internal sealed class MappingClientSideSetupCommand : LocalizedCommands
  11. {
  12. [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
  13. [Dependency] private readonly ILightManager _lightManager = default!;
  14. public override string Command => "mappingclientsidesetup";
  15. public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
  16. public override void Execute(IConsoleShell shell, string argStr, string[] args)
  17. {
  18. if (!_lightManager.LockConsoleAccess)
  19. {
  20. _entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible = true;
  21. _lightManager.Enabled = false;
  22. shell.ExecuteCommand("showsubfloor");
  23. _entitySystemManager.GetEntitySystem<ActionsSystem>().LoadActionAssignments("/mapping_actions.yml", false);
  24. }
  25. }
  26. }