Ability to override an entity's settings GUI.

JasonC
Filter Inserter
Filter Inserter
Posts: 451
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Ability to override an entity's settings GUI.

Post by JasonC »

I think that having the ability to replace an entity's settings GUI with a custom one would really open up a lot of possibilities.

I imagine this could perhaps take the form of a player_opened_settings event (or something), or a new script.on_ hook, that, if handled, prohibits the usual GUI from showing so the mod can do whatever it wants.

This would make strange hacks like making non-selectable entities with invisible but selectable entities on top to provide a GUI (and even that is still limited to the built-in entity GUI's) unnecessary (example).

I'm not sure how this could be integrated with copy+paste functionality. Perhaps something along the lines of a script.on_copy_settings(source_entity, target_entity) hook that the game can call on paste, letting the mod handle it accordingly.

Also currently the game doesn't let you open other entity settings GUI's when one is already being displayed. I am not sure how this could best be integrated. The game would have to have some way of staying aware of the state of whatever GUI objects the mod is managing. Maybe the mod could just manage the behavior itself, if the game always sends the settings-opened event no matter what, then the mod can make the call about whether or not it can actually be displayed.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
Post Reply

Return to “Implemented mod requests”