41 lines
912 B
C#
41 lines
912 B
C#
using System;
|
|
|
|
namespace Game;
|
|
|
|
// Holds common miscellaneous Console variables and commands
|
|
public static class CommonConsoleCommands
|
|
{
|
|
[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));
|
|
}
|
|
} |