2021-06-09 22:19:39 +02:00
|
|
|
|
using Content.Client.HealthOverlay;
|
2021-02-19 19:31:25 +01:00
|
|
|
|
using Robust.Shared.Console;
|
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Commands
|
|
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ToggleHealthOverlayCommand : IConsoleCommand
|
2021-02-19 19:31:25 +01:00
|
|
|
|
{
|
|
|
|
|
|
public string Command => "togglehealthoverlay";
|
|
|
|
|
|
public string Description => "Toggles a health bar above mobs.";
|
|
|
|
|
|
public string Help => $"Usage: {Command}";
|
|
|
|
|
|
|
|
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
|
|
|
|
{
|
|
|
|
|
|
var system = EntitySystem.Get<HealthOverlaySystem>();
|
|
|
|
|
|
system.Enabled = !system.Enabled;
|
|
|
|
|
|
|
|
|
|
|
|
shell.WriteLine($"Health overlay system {(system.Enabled ? "enabled" : "disabled")}.");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|