add description for core commands

This commit is contained in:
in0finite 2022-04-22 21:14:32 +02:00
parent 620855caf6
commit bfc7d40159
2 changed files with 17 additions and 9 deletions

View file

@ -46,6 +46,14 @@ namespace SanAndreasUnity.Commands
this.allowToRunWithoutServerPermissions = allowToRunWithoutServerPermissions; this.allowToRunWithoutServerPermissions = allowToRunWithoutServerPermissions;
} }
public CommandInfo(string command, string description, bool allowToRunWithoutServerPermissions)
: this()
{
this.command = command;
this.description = description;
this.allowToRunWithoutServerPermissions = allowToRunWithoutServerPermissions;
}
public CommandInfo(string command, string description, bool allowToRunWithoutServerPermissions, bool runOnlyOnServer, float limitInterval) public CommandInfo(string command, string description, bool allowToRunWithoutServerPermissions, bool runOnlyOnServer, float limitInterval)
: this() : this()
{ {

View file

@ -12,16 +12,16 @@ namespace SanAndreasUnity.Commands
{ {
var commands = new CommandManager.CommandInfo[] var commands = new CommandManager.CommandInfo[]
{ {
new CommandManager.CommandInfo("uptime", true), new CommandManager.CommandInfo("uptime", "show uptime of application", true),
new CommandManager.CommandInfo("players", true), new CommandManager.CommandInfo("players", "show players", true),
new CommandManager.CommandInfo("stats", "show statistics", false, false, 1f), new CommandManager.CommandInfo("stats", "show statistics", false, false, 1f),
new CommandManager.CommandInfo("kick", false), new CommandManager.CommandInfo("kick", "kick player from server", false),
new CommandManager.CommandInfo("auth", null, true, true, 2f), new CommandManager.CommandInfo("auth", "authenticate", true, true, 2f),
new CommandManager.CommandInfo("startserver", false), new CommandManager.CommandInfo("startserver", "start server", false),
new CommandManager.CommandInfo("starthost", false), new CommandManager.CommandInfo("starthost", "start host", false),
new CommandManager.CommandInfo("connect", false), new CommandManager.CommandInfo("connect", "connect to server", false),
new CommandManager.CommandInfo("exit", false), new CommandManager.CommandInfo("exit", "exit application", false),
new CommandManager.CommandInfo("camera_disable", false), new CommandManager.CommandInfo("camera_disable", "disable or enable camera", false),
}; };
foreach (var immutableCmd in commands) foreach (var immutableCmd in commands)