"Context" for selected_prototype in custom-inputs

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 450
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

"Context" for selected_prototype in custom-inputs

Post by raiguard »

I would like to request a new feature related to the "selected_prototype" field on custom-inputs. Currently, it will only return the thing "contained" in whatever you use the custom-input on. However, it does not tell you what the user actually had selected.

For example, there is no way for me to tell that they used the custom-input on a gun slot:
Screenshot from 2021-04-05 11-13-55.png
Screenshot from 2021-04-05 11-13-55.png (35.21 KiB) Viewed 707 times
I wish to be able to move the information contained in the tooltips into a scrollable GUI, and remove the tooltips. This would allow the user to easily click on each thing to view more information, and search the list if it is too long. If I can detect that they used the hotkey on a gun slot, I could retrieve that information from my mod's database and present it in a nice GUI.

Ideally, this property would be available even if there is no prototype "contained" in the thing. So if they use it on an empty gun slot, I would still want to know that they used it on a gun slot. To this end, a new field on the custom-input "selected_context" might be appropriate.
Don't forget, you're here forever.

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

Re: "Context" for selected_prototype in custom-inputs

Post by Rseding91 »

Unfortunately that information simply isn't known and I can't see any viable way to get it with how the logic works now.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding interface requests”