Page 1 of 1
Placeholder support in the localised "help" of command
Posted: Fri May 12, 2017 10:35 pm
by Mooncat
Request:
Add support for placeholders (__1__, __2__, etc) in the localised "help" of custom commands registered by using
commands.add_command.
Currently, the placeholder __1__ will be displayed as "1" if I type /help (the command) in the game. But it works as expected if I print the string using player.print.
Re: Placeholder support in the localised "help" of command
Posted: Sun May 28, 2017 7:46 pm
by B-Tone
I would also like this!
Re: Placeholder support in the localised "help" of command
Posted: Sun May 28, 2017 8:26 pm
by Rseding91
The /help and player.print() operate using the same methods so they should show the same result.
Can you upload a mod that shows the problem?
Re: Placeholder support in the localised "help" of command
Posted: Mon May 29, 2017 1:40 pm
by Mooncat
Rseding91 wrote:The /help and player.print() operate using the same methods so they should show the same result.
Can you upload a mod that shows the problem?
Thanks for noticing the request, senpai!
A simple command can reproduce the issue:
Code: Select all
/c commands.add_command("foo", {"modifier-description.bullet-shooting-speed-bonus", "blah"}, function(event) end)
Then,
For comparison:
Code: Select all
/c game.player.print{"modifier-description.bullet-shooting-speed-bonus", "blah"}
This is the result:
- foo.jpg (73.93 KiB) Viewed 3463 times
Re: Placeholder support in the localised "help" of command
Posted: Mon May 29, 2017 2:56 pm
by Rseding91
Thanks. It's now fixed for the next version of 0.15.
Re: Placeholder support in the localised "help" of command
Posted: Mon May 29, 2017 3:28 pm
by Mooncat
Rseding91 wrote:Thanks. It's now fixed for the next version of 0.15.
Thanks!