onShutdown

Opposing to onInit, this event gets triggered whenever CET unloads all the mods, either due to the game shutting down, or when pressing the "Reload all mods" button in the CET Overlay.

Use this to do any clean-up work for your mod, e.g. despawning objects or removing status effects.

Usage Example

init.lua
registerForEvent('onShutdown', function()

    -- cleanup code
    
end)

Last updated