AmbientOverlayCommand.cs 608 B

1234567891011121314151617
  1. using Robust.Shared.Console;
  2. namespace Content.Client.Audio;
  3. public sealed class AmbientOverlayCommand : IConsoleCommand
  4. {
  5. public string Command => "showambient";
  6. public string Description => "Shows all AmbientSoundComponents in the viewport";
  7. public string Help => $"{Command}";
  8. public void Execute(IConsoleShell shell, string argStr, string[] args)
  9. {
  10. var system = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<AmbientSoundSystem>();
  11. system.OverlayEnabled ^= true;
  12. shell.WriteLine($"Ambient sound overlay set to {system.OverlayEnabled}");
  13. }
  14. }