Hi to all!
I'm here to ask help about what is the best way (or what is the only one because I haven't yet a solution) about this problem:
We are in control script, we have two entities that have inserter prototype, with some filter slots.
I want that when a filter is setted(changed/removed) in one of two will be setted in the other one and vice versa, same for circuit network connections(connections/disconnections), I don't mind that the cable is connected, only that both are on the same network.
I initially looking in Factorio events, but seems that there isn't a event related to "filter setted" or "circuit network connected".
Any suggestion?
Thanks for all answers in advance.
Synchronize two inserters filters and network connections
Re: Synchronize two inserters filters and network connections
on_gui_closed and on_entity_settings_pasted
Re: Synchronize two inserters filters and network connections
Hi PyroFire, nice to talk to u again!
Sorry but I didn't have understand ur comment completely.
OK, I suppose that from on_gui_closed I can in some way get the entity associated to the filter gui (right?), and on_entity_settings_pasted?
The documentation (as always) is very generic:
What up when an entity is connected via cable to a one circuit network? Trigger one of this two events?
Sorry but I didn't have understand ur comment completely.
OK, I suppose that from on_gui_closed I can in some way get the entity associated to the filter gui (right?), and on_entity_settings_pasted?
The documentation (as always) is very generic:
I should presume that "entity settings" refer to wiki Manipulating entities - Copy entity settings:on_entity_settings_pasted
Called after entity copy-paste is done.
Contains
player_index :: uint
source :: LuaEntity: The source entity settings have been copied from.
destination :: LuaEntity: The destination entity settings have been copied to.
- Recipes for automated crafting machines
- Recipe requests
- Filters for filterable devices
- Circuit network entities and connections
- Railway settings
What up when an entity is connected via cable to a one circuit network? Trigger one of this two events?
Re: Synchronize two inserters filters and network connections
PyroFire told you how to detect player events. There is no way in to detect circuit network events.
I recommend you run a wire between the two inserters and give them identical settings. If that looks bad, try making an invisible wire.
I recommend you run a wire between the two inserters and give them identical settings. If that looks bad, try making an invisible wire.
Re: Synchronize two inserters filters and network connections
Hi DaveMcW,
maybe I have understand, but about on_gui_closed:
maybe I have understand, but about on_gui_closed:
What is this warning telling me? That if a player open another gui is not grant that this event will be trigger? But is grant that the gui of inserter will be closed correctly?on_gui_closed
...
Note: It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.