[2.0.10] Localisation built-in parameter __CONTROL__name__ doesn't accept __1__ anymore
Posted: Thu Oct 24, 2024 5:01 pm
It used to be possible to use a parameter inside built-in parameters.
For example I generate custom inputs for a bunch of shortcuts and append them to the name of the shortcut:
In the .cfg I have the following:
It used to result in a localised name like "Grid (not set)" but now returns "Grid __CONTROL__1__" instead. (Note that it has only two underscores before and after the "1")
For example I generate custom inputs for a bunch of shortcuts and append them to the name of the shortcut:
Code: Select all
local shortcuts = {
"draw-grid"
}
for _, name in pairs(shortcuts) do
if data.raw.shortcut[name] then
data:extend({{
type = "custom-input",
name = data.raw.shortcut[name].name,
localised_name = data.raw.shortcut[name].localised_name,
order = data.raw.shortcut[name].order,
key_sequence = ""
}})
data.raw.shortcut[name].localised_name = {"", data.raw.shortcut[name].localised_name, " ", {"Shortcuts-ick.control", name}}
end
end
Code: Select all
[Shortcuts-ick]
control=(__CONTROL____1____)