Page 1 of 1

Expose player map marker interaction (player.selected or on_click)

Posted: Sat May 04, 2019 3:58 pm
by eradicator
What?

More moddability of a players interaction with map markers.
New property: LuaControl .selected_chart_tag → LuaCustomChartTag
Or new event: on_chart_tag_clicked
mapmarker.png
mapmarker.png (4.37 KiB) Viewed 1044 times

Why?

I'd like to give the player a natural and well integrated way to select a destination for my transportation network on a map. ChartTags already show a selection box, so they seem like the best way to do it.
And the only way i can come up with to implement this is either via a custom hotkey+player.selected or an on_click_event. For flexibility i'd prefer .selected_chart_tag as it allows me to chose which hotkey to combine it with.

Re: Expose player map marker interaction (player.selected or on_click)

Posted: Thu Oct 24, 2019 2:07 pm
by Rseding91
Currently chart tag selection and editing is not game state so that information isn't available to expose for mods to read.

Re: Expose player map marker interaction (player.selected or on_click)

Posted: Tue Oct 29, 2019 4:54 pm
by eradicator
Rseding91 wrote: Thu Oct 24, 2019 2:07 pm Currently chart tag selection and editing is not game state so that information isn't available to expose for mods to read.
Well, eh. That's kinda tautological. I mean, technically all i want is the position that the player clicked. And this was as close to "feels realistic" of an idea as i could come up with. Because "give me the map coordinates of every mouse click so i can do the logic myself" seems less realistic to me even though it would be more versatile.