[Rseding] [0.17.66] Item/Recipe localized name of placeable item ignores entity prototype localised_name.
Posted: Sun Sep 08, 2019 12:03 am
What?
An item that is used to place an entity looks up it's name as "entity-name.whatever" (literally) even if the entity prototype specifies a dynamic name in the prototype. (Additionally the item name can not be overridden with [item-name] either).
Expected behavior
Placeable Item/Recipe should use entity prototype override for its name and description (description already works).
Details
Example mod is: https://mods.factorio.com/mod/er-stockpile
I have an group of dynamically generated entities all placeable_by the same item (shortened code):
This works fine for the entity-info when hovering the entity with the mouse. But the item/recipe (which do *not* specify localised_name/description) do show "unknown-key:" as their name, however the description for both correctly uses the dynamic description from the entity.
Which leads to the weird situation that i have to specify the name of the item/recipe as *entity name* in the locale files:
An item that is used to place an entity looks up it's name as "entity-name.whatever" (literally) even if the entity prototype specifies a dynamic name in the prototype. (Additionally the item name can not be overridden with [item-name] either).
Expected behavior
Placeable Item/Recipe should use entity prototype override for its name and description (description already works).
Details
Example mod is: https://mods.factorio.com/mod/er-stockpile
I have an group of dynamically generated entities all placeable_by the same item (shortened code):
Code: Select all
local entity = {
type = "container", name = name,
this.localised_name = {'er.stockpile-name',lsize,ltype,log_mode}
this.localised_description = {'er.stockpile-description'}
}
local item = {
type = "item", name = name,
place_result = name,
this.localised_name = nil,
this.localised_description = nil,
}
Code: Select all
[er]
stockpile-name=__1__ __2__Stockpile__3__
stockpile-description=Just some empty space...
Which leads to the weird situation that i have to specify the name of the item/recipe as *entity name* in the locale files:
Code: Select all
[entity-name] <--used only for item names here
er:stockpile-medium=Medium Stockpile
er:stockpile-large=Large Stockpile
er:stockpile-huge=Huge Stockpile