Core/Misc: Misc cleanups and changing of fields

This commit is contained in:
hondacrx
2018-05-13 20:26:05 -04:00
parent 868c67c8f0
commit 7d4c0b7634
38 changed files with 269 additions and 244 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ namespace Game.Chat
return true;
}
public bool ExecuteCommandInTable(List<ChatCommand> table, string text, string fullcmd)
public bool ExecuteCommandInTable(ICollection<ChatCommand> table, string text, string fullcmd)
{
StringArguments args = new StringArguments(text);
string cmd = args.NextString();
@@ -168,7 +168,7 @@ namespace Game.Chat
return false;
}
public bool ShowHelpForCommand(List<ChatCommand> table, string text)
public bool ShowHelpForCommand(ICollection<ChatCommand> table, string text)
{
StringArguments args = new StringArguments(text);
if (!args.Empty())
@@ -226,7 +226,7 @@ namespace Game.Chat
return ShowHelpForSubCommands(table, "", text);
}
public bool ShowHelpForSubCommands(List<ChatCommand> table, string cmd, string subcmd)
public bool ShowHelpForSubCommands(ICollection<ChatCommand> table, string cmd, string subcmd)
{
string list = "";
foreach (var command in table)
+3 -3
View File
@@ -69,7 +69,7 @@ namespace Game.Chat
}
}
static bool SetDataForCommandInTable(List<ChatCommand> table, string text, uint permission, string help, string fullcommand)
static bool SetDataForCommandInTable(ICollection<ChatCommand> table, string text, uint permission, string help, string fullcommand)
{
StringArguments args = new StringArguments(text);
string cmd = args.NextString().ToLower();
@@ -135,9 +135,9 @@ namespace Game.Chat
}
}
public static List<ChatCommand> GetCommands()
public static ICollection<ChatCommand> GetCommands()
{
return _commands.Values.ToList();
return _commands.Values;
}
static SortedDictionary<string, ChatCommand> _commands = new SortedDictionary<string, ChatCommand>();