1
0

ShowMechanismsCommand.cs 803 B

1234567891011121314151617181920212223242526
  1. using Content.Shared.Body.Organ;
  2. using Robust.Client.GameObjects;
  3. using Robust.Shared.Console;
  4. namespace Content.Client.Commands;
  5. public sealed class ShowMechanismsCommand : LocalizedCommands
  6. {
  7. [Dependency] private readonly IEntityManager _entManager = default!;
  8. public const string CommandName = "showmechanisms";
  9. public override string Command => CommandName;
  10. public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
  11. public override void Execute(IConsoleShell shell, string argStr, string[] args)
  12. {
  13. var query = _entManager.AllEntityQueryEnumerator<OrganComponent, SpriteComponent>();
  14. while (query.MoveNext(out _, out var sprite))
  15. {
  16. sprite.ContainerOccluded = false;
  17. }
  18. }
  19. }