The localised_name of the items seem to fall back to the entity names, if the item is placeable as entity. But the localised_description does not fall back to the entity description.
Example using the rocket silo:
Code: Select all
# control.lua
script.on_init(function()
for _, item in pairs(game.item_prototypes) do
if (item.name == 'rocket-silo') then
print('NAME: ' .. item.localised_name[1])
print('DESCRIPTION: ' .. item.localised_description[1])
assert(false)
end
end
assert(false)
end)
Here you see that the rocket-silo tiem has the localised name "entity-name.rocket-silo" (i.e. it fell back to the entity), but it still holds on to "item-description.rocket-silo" (which does not exist) rather than also falling back to "entity-description.rocket-silo" (which actually exists).log wrote:NAME: entity-name.rocket-silo
DESCRIPTION: item-description.rocket-silo
Intended behavior or actual bug?