1
0

DebugCommands.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Content.Client.Markers;
  2. using Content.Client.Popups;
  3. using Content.Client.SubFloor;
  4. using Content.Shared.SubFloor;
  5. using Robust.Client.GameObjects;
  6. using Robust.Shared.Console;
  7. using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
  8. namespace Content.Client.Commands;
  9. internal sealed class ShowMarkersCommand : LocalizedCommands
  10. {
  11. [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
  12. public override string Command => "showmarkers";
  13. public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
  14. public override void Execute(IConsoleShell shell, string argStr, string[] args)
  15. {
  16. _entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible ^= true;
  17. }
  18. }
  19. internal sealed class ShowSubFloor : LocalizedCommands
  20. {
  21. [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
  22. public override string Command => "showsubfloor";
  23. public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
  24. public override void Execute(IConsoleShell shell, string argStr, string[] args)
  25. {
  26. _entitySystemManager.GetEntitySystem<SubFloorHideSystem>().ShowAll ^= true;
  27. }
  28. }
  29. internal sealed class NotifyCommand : LocalizedCommands
  30. {
  31. [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
  32. public override string Command => "notify";
  33. public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
  34. public override void Execute(IConsoleShell shell, string argStr, string[] args)
  35. {
  36. var message = args[0];
  37. _entitySystemManager.GetEntitySystem<PopupSystem>().PopupCursor(message);
  38. }
  39. }