[2.0.10] Localisation built-in parameter __CONTROL__name__ doesn't accept __1__ anymore

Bugs that are actually features.
User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 794
Joined: Sun May 07, 2017 10:16 am
Contact:

[2.0.10] Localisation built-in parameter __CONTROL__name__ doesn't accept __1__ anymore

Post by ickputzdirwech »

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:

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
In the .cfg I have the following:

Code: Select all

[Shortcuts-ick]
control=(__CONTROL____1____)
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")
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Genhis
Factorio Staff
Factorio Staff
Posts: 746
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [2.0.10] Localisation built-in parameter __CONTROL__name__ doesn't accept __1__ anymore

Post by Genhis »

Thanks for the report, this works as intended. Parameters are now processed in one pass.
Post Reply

Return to “Not a bug”