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?