using Robust.Client.Graphics; using Robust.Client.ResourceManagement; using Robust.Shared.Console; namespace Content.Client.Access.Commands; public sealed class ShowAccessReadersCommand : IConsoleCommand { public string Command => "showaccessreaders"; public string Description => "Shows all access readers in the viewport"; public string Help => $"{Command}"; public void Execute(IConsoleShell shell, string argStr, string[] args) { var collection = IoCManager.Instance; if (collection == null) return; var overlay = collection.Resolve(); if (overlay.RemoveOverlay()) { shell.WriteLine($"Set access reader debug overlay to false"); return; } var entManager = collection.Resolve(); var cache = collection.Resolve(); var system = entManager.EntitySysManager.GetEntitySystem(); overlay.AddOverlay(new AccessOverlay(entManager, cache, system)); shell.WriteLine($"Set access reader debug overlay to true"); } }