[0.17.48] Ability to programmatically set locale for autoplace controls
Posted: Wed Jun 12, 2019 3:36 am
Hello, I have encountered an issue. It appears that the localised_name field does not get used to set the display names of autoplace controls in the new game menu.
I would request that much like how other prototypes can have in game language updated programmatically, that autplace controls can be as well.
Below is some example code:
data:extend(
{
{
type = "autoplace-control",
name = "resource",
richness = true,
order = 1,
category="resource",
localised_name = {"autoplace-control-names.generic-autoplace", "anything"}
},
{
type = "noise-layer",
name = "resource",
},
})
Locale file
[autoplace-control-names]
generic-autoplace=__1__
It appears that this locale entry still exists in game, it just isn't being used for the new game menu. Here is a command that can be run in game to show.
/c game.print{"autoplace-control-names.generic-autoplace", "anything"}
This would help decouple prototype names used under the hood from affecting the in game display text used (my motivation for submitting this request).
Thank you for your time.
I would request that much like how other prototypes can have in game language updated programmatically, that autplace controls can be as well.
Below is some example code:
data:extend(
{
{
type = "autoplace-control",
name = "resource",
richness = true,
order = 1,
category="resource",
localised_name = {"autoplace-control-names.generic-autoplace", "anything"}
},
{
type = "noise-layer",
name = "resource",
},
})
Locale file
[autoplace-control-names]
generic-autoplace=__1__
It appears that this locale entry still exists in game, it just isn't being used for the new game menu. Here is a command that can be run in game to show.
/c game.print{"autoplace-control-names.generic-autoplace", "anything"}
This would help decouple prototype names used under the hood from affecting the in game display text used (my motivation for submitting this request).
Thank you for your time.