Files
tbd-station-14/Content.Client/Commands/ShowMechanismsCommand.cs
Tayrtahn 3dcfc3a99e Cleanup more SpriteComponent warnings (part 4) (#37550)
* Cleanup warnings in ClickableSystem

* Cleanup warnings in FultonSystem

* Cleanup warning in HolidaySystem

* Cleanup warning in DoAfterOverlay

* Cleanup warning in EntityHealthBarOverlay

* Cleanup warning in SmokeVisualizerSystem

* Cleanup warning in VaporVisualizerSystem

* Cleanup warning in ColorFlashEffectSystem

* Cleanup warnings in StealthSystem

* Cleanup warnings in TrayScannerSystem

* Cleanup warnings in InventoryUIController

* Cleanup warnings in HideMechanismsCommand

* Cleanup warning in ShowMechanismsCommand

* Cleanup warnings in EntityPickupAnimationSystem

* Cleanup warnings in PointingSystem

* Cleanup warning in StickyVisualizerSystem

* Cleanup warnings in TabletopSystem

* Cleanup warnings in PillSystem

* Cleanup warnings in DiceSystem

* Cleanup warnings in ProjectileSystem
2025-05-18 03:48:11 +02:00

28 lines
896 B
C#

using Content.Shared.Body.Organ;
using Robust.Client.GameObjects;
using Robust.Shared.Console;
namespace Content.Client.Commands;
public sealed class ShowMechanismsCommand : LocalizedCommands
{
[Dependency] private readonly IEntityManager _entManager = default!;
public const string CommandName = "showmechanisms";
public override string Command => CommandName;
public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var spriteSys = _entManager.System<SpriteSystem>();
var query = _entManager.AllEntityQueryEnumerator<OrganComponent, SpriteComponent>();
while (query.MoveNext(out var uid, out _, out var sprite))
{
spriteSys.SetContainerOccluded((uid, sprite), false);
}
}
}