mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Add shutdown hook interface to Lua API
Scripts can call minetest.register_on_shutdown() to register a shutdown hook. Document that minetest.register_on_shutdown() callbacks may not be run If the server crashes, it is unlikely that callbacks registered using minetest.register_on_shutdown() will be called.
This commit is contained in:
parent
ab45133ab4
commit
6c8fa83ecd
5 changed files with 27 additions and 0 deletions
|
@ -55,6 +55,9 @@ void scriptapi_environment_step(lua_State *L, float dtime);
|
|||
void scriptapi_environment_on_generated(lua_State *L, v3s16 minp, v3s16 maxp,
|
||||
u32 blockseed);
|
||||
|
||||
/* server */
|
||||
void scriptapi_on_shutdown(lua_State *L);
|
||||
|
||||
/* misc */
|
||||
void scriptapi_on_newplayer(lua_State *L, ServerActiveObject *player);
|
||||
void scriptapi_on_dieplayer(lua_State *L, ServerActiveObject *player);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue