using Content.Client.Markers; using Content.Client.Popups; using Content.Client.SubFloor; using Content.Shared.SubFloor; using Robust.Client.GameObjects; using Robust.Shared.Console; using DrawDepth = Content.Shared.DrawDepth.DrawDepth; namespace Content.Client.Commands; internal sealed class ShowMarkersCommand : LocalizedCommands { [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!; public override string Command => "showmarkers"; public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command)); public override void Execute(IConsoleShell shell, string argStr, string[] args) { _entitySystemManager.GetEntitySystem().MarkersVisible ^= true; } } internal sealed class ShowSubFloor : LocalizedCommands { [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!; public override string Command => "showsubfloor"; public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command)); public override void Execute(IConsoleShell shell, string argStr, string[] args) { _entitySystemManager.GetEntitySystem().ShowAll ^= true; } } internal sealed class ShowSubFloorForever : LocalizedCommands { [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!; public const string CommandName = "showsubfloorforever"; 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) { _entitySystemManager.GetEntitySystem().ShowAll = true; var entMan = IoCManager.Resolve(); var components = entMan.EntityQuery(true); foreach (var (_, sprite) in components) { sprite.DrawDepth = (int) DrawDepth.Overlays; } } } internal sealed class NotifyCommand : LocalizedCommands { [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!; public override string Command => "notify"; public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command)); public override void Execute(IConsoleShell shell, string argStr, string[] args) { var message = args[0]; _entitySystemManager.GetEntitySystem().PopupCursor(message); } }