Access builtin gui, entity_gui_opened event, extend entity settings

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
APXEOLOG
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Mar 23, 2013 4:04 pm
Contact:

Access builtin gui, entity_gui_opened event, extend entity settings

Post by APXEOLOG »

Hi, i really would like to have an access to the builtin gui and also track the event when player opens it. Also i would like to have the ability to add additional entity settings that will be copied via Copy Settings or stored inside the blueprint and restored when built by construction robots.

Use case:
Player opens the inserter configuration gui
Script receive event entity_gui_opened(LuaEntity target, LuaPlayer player, LuaGuiElement windowRoot)
Script adds custom child gui: configuration button (right before those "logistic" and "circuit" buttons) and all custom gui logic
Player configures the custom inserter logic, (for example: entity.settings.A = 1)
Player close the gui in normal way (all custom gui elements closed too because we've closed the root)
Player build new inserter and copy settings from the configured one
The new inserter have the entity.settings.A == 1 now
Same for the blueprint

I don't have the expirience with this mod api but i've looked through the docs and didn't find any information about custom entity settings, only settings_copy events

Post Reply

Return to “Modding interface requests”