1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

on_joinplayer + on_leaveplayer + scriptapi_run_callbacks + bugfix

Add minetest.register_on_joinplayer and minetest.register_on_leaveplayer,
make adding new callbacks to scriptapi.cpp easier by adding
scriptapi_run_callbacks, also fix a minor bug with PlayerSAO <->
singleplayer mode interaction
This commit is contained in:
Kahrl 2012-03-24 18:52:50 +01:00 committed by Perttu Ahola
parent f8c3743991
commit a9ddbb4beb
4 changed files with 208 additions and 111 deletions

View file

@ -57,6 +57,8 @@ void scriptapi_environment_on_generated(lua_State *L, v3s16 minp, v3s16 maxp,
void scriptapi_on_newplayer(lua_State *L, ServerActiveObject *player);
void scriptapi_on_dieplayer(lua_State *L, ServerActiveObject *player);
bool scriptapi_on_respawnplayer(lua_State *L, ServerActiveObject *player);
void scriptapi_on_joinplayer(lua_State *L, ServerActiveObject *player);
void scriptapi_on_leaveplayer(lua_State *L, ServerActiveObject *player);
void scriptapi_get_creative_inventory(lua_State *L, ServerActiveObject *player);
/* item callbacks */