In the Factorio_0.18\data\core\lualib\ you can find the file event_handler.lua which allows you to run multiple control files without script changing.
How to use it?
I've found some examples in the Factorio_0.18\data\base\scenarios\freeplay\freeplay.lua and Factorio\data\base\scenarios\sandbox\sandbox.lua
How of are you using by modding this feature?
Event handler
Re: Event handler
I use it in the base game scenarios PvP, Wave defense, and also in my mods,
Such as example: https://github.com/Klonan/Transport_Drones
Basically each lib script returns a few things, such as a table of events, a function for on_init and on_load, etc.
And the event handler script will hook all of them
Such as example: https://github.com/Klonan/Transport_Drones
Basically each lib script returns a few things, such as a table of events, a function for on_init and on_load, etc.
And the event handler script will hook all of them
Re: Event handler
Is it the same as event register? viewtopic.php?f=34&t=49186
Re: Event handler
I don't know, I have never used that systemdarkfrei wrote: Mon May 11, 2020 12:32 pm Is it the same as event register? viewtopic.php?f=34&t=49186
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: Event handler
Same spirit, slightly different implementation, but only vaguely.Klonan wrote: Mon May 11, 2020 2:22 pmI don't know, I have never used that systemdarkfrei wrote: Mon May 11, 2020 12:32 pm Is it the same as event register? viewtopic.php?f=34&t=49186