miuu-sandbox/ConsoleCommands.cs

54 lines
1.4 KiB
C#
Raw Normal View History

2024-02-01 01:06:57 -05:00
using MIU;
namespace Sandbox
{
internal class ConsoleCommands
{
[ConsoleCommand(description = "Enable/disable velocity cap")]
public static string mbuncapvelocity(params string[] args)
2024-02-01 01:06:57 -05:00
{
if (args.Length != 1)
return "Expected 1 argument: 0, 1, or show";
switch (args[0])
{
case "show":
return Config.uncapVelocity ? "Velocity is currently uncapped" : "Velocity is currently capped";
case "0":
case "false":
Config.uncapVelocity = false;
return "Velocity has been capped";
case "1":
case "true":
Config.uncapVelocity = true;
return "Velocity has been uncapped";
default:
return "Unknown value. Expected 0, 1, or show";
}
}
[ConsoleCommand(description = "Enable/disable diagonal movement")]
public static string mbdiagonal(params string[] args)
{
if (args.Length != 1)
return "Expected 1 argument: 0, 1, or show";
switch (args[0])
{
case "show":
return Config.diagonalMovement ? "Diagonal movement is currently disabled" : "Diagonal movement is currently enabled";
case "0":
case "false":
Config.diagonalMovement = false;
return "Diagonal movement has been disabled";
case "1":
case "true":
Config.diagonalMovement = true;
return "Diagonal movement has been enabled";
default:
return "Unknown value. Expected 0, 1, or show";
}
2024-02-01 01:06:57 -05:00
}
}
}