Localize developer debug cheats.

This commit is contained in:
Matthias Mailänder
2022-10-19 18:20:20 +02:00
committed by abcdefg30
parent 44aaf4dd07
commit 8f415bc7af
11 changed files with 163 additions and 36 deletions

View File

@@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Commands
[TranslationReference]
static readonly string NoDescription = "no-description";
[TranslationReference]
static readonly string HelpDescription = "help-description";
World world;
ChatCommands console;
@@ -43,7 +46,7 @@ namespace OpenRA.Mods.Common.Commands
console = world.WorldActor.Trait<ChatCommands>();
console.RegisterCommand("help", this);
RegisterHelp("help", "provides useful info about various commands");
RegisterHelp("help", HelpDescription);
}
public void InvokeCommand(string name, string arg)
@@ -61,7 +64,7 @@ namespace OpenRA.Mods.Common.Commands
public void RegisterHelp(string name, string description)
{
helpDescriptions[name] = description;
helpDescriptions[name] = Game.ModData.Translation.GetString(description);
}
}
}