Allow overriding previously registered chatcommands

This commit is contained in:
Taryn Hill
2016-06-28 20:46:05 -05:00
parent 4d90361b8b
commit 023b17a68e
2 changed files with 3 additions and 2 deletions

View File

@@ -48,7 +48,8 @@ namespace OpenRA.Mods.Common.Commands
public void RegisterCommand(string name, IChatCommand command)
{
Commands.Add(name.ToLowerInvariant(), command);
// Override possible duplicates instead of crashing.
Commands[name.ToLowerInvariant()] = command;
}
}