2020-11-07 01:15:56 +01:00
|
|
|
using Content.Shared;
|
2021-02-01 16:49:43 -08:00
|
|
|
using Robust.Shared.Console;
|
2020-06-22 14:43:20 -05:00
|
|
|
using Robust.Shared.Interfaces.Configuration;
|
|
|
|
|
using Robust.Shared.IoC;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Commands
|
|
|
|
|
{
|
|
|
|
|
public class ToggleOutlineCommand : IConsoleCommand
|
|
|
|
|
{
|
|
|
|
|
public string Command => "toggleoutline";
|
|
|
|
|
|
|
|
|
|
public string Description => "Toggles outline drawing on entities.";
|
|
|
|
|
|
|
|
|
|
public string Help => "";
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
2020-06-22 14:43:20 -05:00
|
|
|
{
|
2020-11-07 01:15:56 +01:00
|
|
|
var configurationManager = IoCManager.Resolve<IConfigurationManager>();
|
|
|
|
|
var cvar = CCVars.OutlineEnabled;
|
|
|
|
|
var old = configurationManager.GetCVar(cvar);
|
|
|
|
|
|
|
|
|
|
configurationManager.SetCVar(cvar, !old);
|
2021-02-01 16:49:43 -08:00
|
|
|
shell.WriteLine($"Draw outlines set to: {configurationManager.GetCVar(cvar)}");
|
2020-06-22 14:43:20 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|