ShowSpreadCommand.cs 633 B

123456789101112131415161718
  1. using Content.Client.Weapons.Ranged.Systems;
  2. using Robust.Shared.Console;
  3. namespace Content.Client.Weapons.Ranged;
  4. public sealed class ShowSpreadCommand : IConsoleCommand
  5. {
  6. public string Command => "showgunspread";
  7. public string Description => $"Shows gun spread overlay for debugging";
  8. public string Help => $"{Command}";
  9. public void Execute(IConsoleShell shell, string argStr, string[] args)
  10. {
  11. var system = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<GunSystem>();
  12. system.SpreadOverlay ^= true;
  13. shell.WriteLine($"Set spread overlay to {system.SpreadOverlay}");
  14. }
  15. }