Document which calls raise events
Document which calls raise events
Some but not all API calls can raise events, which may invalidate LuaObjects held by mods. It would be good if the documentation for the API calls indicated whether they raise events, so mod authors can know whether it is necessary to re-validate held references.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Re: Document which calls raise events
The concept sounds nice but quickly becomes a huge annoyance for us internally as we have to every time we change anything to fire an event or not go over literally all of the Lua API and check which things may get to that logic by any round-about way.
In the end, you should always validate your objects are valid before using them.
In the end, you should always validate your objects are valid before using them.
If you want to get ahold of me I'm almost always on Discord.
Re: Document which calls raise events
You know that I'm crazy about documentation :pRseding91 wrote: ↑Thu Jul 25, 2019 5:38 pm The concept sounds nice but quickly becomes a huge annoyance for us internally as we have to every time we change anything to fire an event or not go over literally all of the Lua API and check which things may get to that logic by any round-about way.
In the end, you should always validate your objects are valid before using them.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.