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

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

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

Post 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 788 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.
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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

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.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

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

Post 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.
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.

Post Reply

Return to “Modding interface requests”