Whenever a lua script references a core struct obj, increment a counter in the obj struct. Core code will not free the obj, if there are any lua references pointing to it, just makes it free-floating. When lua script ends, the lua gc will free the free-floating objects. Also exposes u.inventory to lua. Breaks save and bones compat.
21 KiB
21 KiB