Files
GoakeFlax/Source/Game/Console/CommonCommands.cs
2022-05-14 19:10:13 +03:00

42 lines
1.0 KiB
C#

using System;
namespace Game
{
// Holds common miscellaneous Console variables and commands
public static class CommonCommands
{
[ConsoleVariable("developer")]
public static string Developer
{
get => Console.DebugVerbosity.ToString();
set
{
if (int.TryParse(value, out int intValue) && intValue >= 0)
Console.DebugVerbosity = intValue;
}
}
[ConsoleCommand("")]
public static void NullCommand()
{
}
[ConsoleCommand("echo")]
public static void EchoCommand()
{
Console.Print("nothing");
}
[ConsoleCommand("echo")]
public static void EchoCommand(string[] text)
{
Console.Print(string.Join(" ", text));
}
[ConsoleCommand("debugthrow")]
public static void DebugThrowCommand(string[] text)
{
throw new Exception(string.Join(" ", text));
}
}
}