What?
More moddability of a players interaction with map markers.
New property: LuaControl .selected_chart_tag → LuaCustomChartTag
Or new event: on_chart_tag_clicked
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.
Expose player map marker interaction (player.selected or on_click)
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Expose player map marker interaction (player.selected or on_click)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Expose player map marker interaction (player.selected or on_click)
Currently chart tag selection and editing is not game state so that information isn't available to expose for mods to read.
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Expose player map marker interaction (player.selected or on_click)
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.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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.