Files
wwdpublic/Content.Client/Commands/DebugCommands.cs
SpaceManiac ca612aa160 Merge showsubfloorforever into showsubfloor (#33682)
(cherry picked from commit 38615b72e5cd2a2ef5e539b40cc5802e6542da91)
2025-10-04 12:51:15 +03:00

54 lines
1.8 KiB
C#

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<MarkerSystem>().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<SubFloorHideSystem>().ShowAll ^= true;
}
}
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<PopupSystem>().PopupCursor(message);
}
}