2022-10-23 00:46:28 +02:00
|
|
|
|
using Content.Shared.Body.Organ;
|
2020-10-26 12:11:32 +01:00
|
|
|
|
using Robust.Client.Console;
|
|
|
|
|
|
using Robust.Client.GameObjects;
|
2021-02-01 16:49:43 -08:00
|
|
|
|
using Robust.Shared.Console;
|
2020-10-26 12:11:32 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Commands
|
|
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ShowMechanismsCommand : IConsoleCommand
|
2020-10-26 12:11:32 +01:00
|
|
|
|
{
|
|
|
|
|
|
public const string CommandName = "showmechanisms";
|
|
|
|
|
|
|
|
|
|
|
|
// ReSharper disable once StringLiteralTypo
|
|
|
|
|
|
public string Command => CommandName;
|
|
|
|
|
|
public string Description => "Makes mechanisms visible, even when they shouldn't be.";
|
|
|
|
|
|
public string Help => $"{Command}";
|
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
2020-10-26 12:11:32 +01:00
|
|
|
|
{
|
2021-09-28 13:35:29 +02:00
|
|
|
|
var entityManager = IoCManager.Resolve<IEntityManager>();
|
2023-10-19 12:34:31 -07:00
|
|
|
|
var query = entityManager.AllEntityQueryEnumerator<OrganComponent, SpriteComponent>();
|
2020-10-26 12:11:32 +01:00
|
|
|
|
|
2023-10-19 12:34:31 -07:00
|
|
|
|
while (query.MoveNext(out _, out var sprite))
|
2020-10-26 12:11:32 +01:00
|
|
|
|
{
|
2023-10-19 12:34:31 -07:00
|
|
|
|
sprite.ContainerOccluded = false;
|
2020-10-26 12:11:32 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
|
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand("showcontainedcontext");
|
2020-10-26 12:11:32 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|