Allow overriding previously registered chatcommands
This commit is contained in:
@@ -48,7 +48,8 @@ namespace OpenRA.Mods.Common.Commands
|
|||||||
|
|
||||||
public void RegisterCommand(string name, IChatCommand command)
|
public void RegisterCommand(string name, IChatCommand command)
|
||||||
{
|
{
|
||||||
Commands.Add(name.ToLowerInvariant(), command);
|
// Override possible duplicates instead of crashing.
|
||||||
|
Commands[name.ToLowerInvariant()] = command;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Commands
|
|||||||
|
|
||||||
public void RegisterHelp(string name, string description)
|
public void RegisterHelp(string name, string description)
|
||||||
{
|
{
|
||||||
helpDescriptions.Add(name, description);
|
helpDescriptions[name] = description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user