Page 1 of 1

[Library 0.14+] Lifecycle events

Posted: Wed Oct 26, 2016 10:15 pm
by aubergine18
A library that mods can use to trigger events when they create or destroy entities.

This is useful when you want to create/destroy entities that are external to your mod: other mods sometimes need to get notified, but the Lua API provides no standard way to do this (and the devs won't implement it).

This library module, that you can drop in to your mod easily, aims to fix that shortcoming by adding event-triggering alternatives to `LuaSurface.create_entity()` and `LuaEntity.destroy()`.

https://github.com/aubergine10/lifecycle-events

Need help with testing, and also help to flesh out the `can_destroy()` function.