[Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer
Posted: Sun Oct 20, 2019 11:16 pm
We can use LuaForce.add_chart_tag(surface, tag) to place a tag (icon and/or text) on the map. Unfortunately, such tags are visible to all players belonging to that force.
I'm looking for add_chart_tag on a per-player level, so I can leave tags on the map that are only visible to an individual player. In this post, it was suggested that something like player.add_chart_tag(surface, tag) or force.add_chart_tag(surface, tag, player) would be needed instead. Would you consider adding this, please (it probably would make sense to add that to find_chart_tags() as well)?
While I'm at it: tag requires an icon and/or a text. However, "text" is expected to be a string. It would be nice if it could also be a localized string. Is there any chance on getting that implemented?
Finally, I'd like to know whether it's possible to change the icon of an entity in map view.
My use case is again this mod: When a vehicle "owned" by a player is destroyed, I want to mark the spot where it was on the map so that it is only visible to the "owner" (no need to clutter up the map with information that is of no interest to other players).
Also, if a vehicle that "belongs" to somebody is used by other players, I'd like to have its icon on the map -- as a kind of tracker, so the "owner" can see where his vehicle is moving. Currently, all vehicles are marked with that triangle sign; it's impossible to tell them apart just from looking at this icon. Therefore, I want to use the entity icon of that particular vehicle (i.e. the icon of the vanilla car/tank, or any other vehicle of the car prototype that has been added by mods) when the map is displayed to the vehicle's "owner". Would that even be possible without desyncs?
I'm looking for add_chart_tag on a per-player level, so I can leave tags on the map that are only visible to an individual player. In this post, it was suggested that something like player.add_chart_tag(surface, tag) or force.add_chart_tag(surface, tag, player) would be needed instead. Would you consider adding this, please (it probably would make sense to add that to find_chart_tags() as well)?
While I'm at it: tag requires an icon and/or a text. However, "text" is expected to be a string. It would be nice if it could also be a localized string. Is there any chance on getting that implemented?
Finally, I'd like to know whether it's possible to change the icon of an entity in map view.
My use case is again this mod: When a vehicle "owned" by a player is destroyed, I want to mark the spot where it was on the map so that it is only visible to the "owner" (no need to clutter up the map with information that is of no interest to other players).
Also, if a vehicle that "belongs" to somebody is used by other players, I'd like to have its icon on the map -- as a kind of tracker, so the "owner" can see where his vehicle is moving. Currently, all vehicles are marked with that triangle sign; it's impossible to tell them apart just from looking at this icon. Therefore, I want to use the entity icon of that particular vehicle (i.e. the icon of the vanilla car/tank, or any other vehicle of the car prototype that has been added by mods) when the map is displayed to the vehicle's "owner". Would that even be possible without desyncs?