Request: Prototype/ResourceEntity custom_map_tooltip property
Posted: Tue Jun 28, 2022 2:50 am
Please add a new property for the 'resource' prototype:
name: custom_map_tooltip
type: LocalisedString
default: nil
If this is specified, then it should be displayed on the map view when hovering over the resource, instead of the default generated tooltip which shows the product names / amounts.
We have some special resources, which are modified by control scripts and the initial products/amounts are just meaningless placeholders. To avoid confusing the players, it'd be nice if the map tooltip could display a custom text instead of the meaningless placeholder item when hovering over the resource.
Optional: Maybe pass in the original generated tooltip as the __1__ parameter of the LocalisedString. We won't use this, but it would make this a bit more flexible.
You might also want to make this available as a read-only field at runtime on the LuaEntityPrototype.
name: custom_map_tooltip
type: LocalisedString
default: nil
If this is specified, then it should be displayed on the map view when hovering over the resource, instead of the default generated tooltip which shows the product names / amounts.
We have some special resources, which are modified by control scripts and the initial products/amounts are just meaningless placeholders. To avoid confusing the players, it'd be nice if the map tooltip could display a custom text instead of the meaningless placeholder item when hovering over the resource.
Optional: Maybe pass in the original generated tooltip as the __1__ parameter of the LocalisedString. We won't use this, but it would make this a bit more flexible.
You might also want to make this available as a read-only field at runtime on the LuaEntityPrototype.