[1.1.74] Localised item name is not found for some items
Posted: Fri Dec 30, 2022 9:10 pm
I am developing a mod that displays resource objectives. However, pipe-to-ground does not return the localised item name:
To demonstrate the issue more easily, here's how to replicate it in the command prompt / in-game chat.
When I run this, everything works as expected:
However, when I run this, it doesn't work:
Same problem for at least pipe and small-electric-pole.
I would expect them to to output/return the same string as this code does, just without icon, the brackets and the "Item:" text.
(Concatenation is added so that Factorio's chat doesn't reformat the command string in the screenshot.)
In other words, I think the second code snippet should print "Pipe to ground".
Should I use something other than {"item-name..."} for getting the localised name of the item?
To demonstrate the issue more easily, here's how to replicate it in the command prompt / in-game chat.
When I run this, everything works as expected:
Code: Select all
/c game.print({"item-name.iron-plate"})
However, when I run this, it doesn't work:
Code: Select all
/c game.print({"item-name.pipe-to-ground"})
Same problem for at least pipe and small-electric-pole.
I would expect them to to output/return the same string as this code does, just without icon, the brackets and the "Item:" text.
Code: Select all
/c game.print("[item=pipe-to-ground" .. "]")
In other words, I think the second code snippet should print "Pipe to ground".
Should I use something other than {"item-name..."} for getting the localised name of the item?