CatStation/Content.Client/Ghost/Commands/ToggleGhostVisibilityCommand.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

18 lines
566 B
C#

using Robust.Shared.Console;
namespace Content.Client.Ghost.Commands;
public sealed partial class ToggleGhostVisibilityCommand : LocalizedEntityCommands
{
[Dependency] private GhostSystem _ghost = default!;
public override string Command => "toggleghostvisibility";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 0 && bool.TryParse(args[0], out var visibility))
_ghost.ToggleGhostVisibility(visibility);
else
_ghost.ToggleGhostVisibility();
}
}