]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/scriptapi.h
Last set of minor cleanups
[dragonfireclient.git] / src / scriptapi.h
index f695e5263f47391a420edddf972121b70a844f19..d71b8fe41e412ccabfdc41e603df97c51ec3f5f9 100644 (file)
@@ -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);
@@ -113,7 +116,7 @@ int scriptapi_nodemeta_inventory_allow_put(lua_State *L, v3s16 p,
                ServerActiveObject *player);
 // Return number of accepted items to be taken
 int scriptapi_nodemeta_inventory_allow_take(lua_State *L, v3s16 p,
-               const std::string &listname, int index, int count,
+               const std::string &listname, int index, ItemStack &stack,
                ServerActiveObject *player);
 // Report moved items
 void scriptapi_nodemeta_inventory_on_move(lua_State *L, v3s16 p,
@@ -126,7 +129,7 @@ void scriptapi_nodemeta_inventory_on_put(lua_State *L, v3s16 p,
                ServerActiveObject *player);
 // Report taken items
 void scriptapi_nodemeta_inventory_on_take(lua_State *L, v3s16 p,
-               const std::string &listname, int index, int count,
+               const std::string &listname, int index, ItemStack &stack,
                ServerActiveObject *player);
 
 /* Detached inventory callbacks */
@@ -144,7 +147,7 @@ int scriptapi_detached_inventory_allow_put(lua_State *L,
 // Return number of accepted items to be taken
 int scriptapi_detached_inventory_allow_take(lua_State *L,
                const std::string &name,
-               const std::string &listname, int index, int count,
+               const std::string &listname, int index, ItemStack &stack,
                ServerActiveObject *player);
 // Report moved items
 void scriptapi_detached_inventory_on_move(lua_State *L,
@@ -160,14 +163,14 @@ void scriptapi_detached_inventory_on_put(lua_State *L,
 // Report taken items
 void scriptapi_detached_inventory_on_take(lua_State *L,
                const std::string &name,
-               const std::string &listname, int index, int count,
+               const std::string &listname, int index, ItemStack &stack,
                ServerActiveObject *player);
 
 /* luaentity */
 // Returns true if succesfully added into Lua; false otherwise.
 bool scriptapi_luaentity_add(lua_State *L, u16 id, const char *name);
 void scriptapi_luaentity_activate(lua_State *L, u16 id,
-               const std::string &staticdata);
+               const std::string &staticdata, u32 dtime_s);
 void scriptapi_luaentity_rm(lua_State *L, u16 id);
 std::string scriptapi_luaentity_get_staticdata(lua_State *L, u16 id);
 void scriptapi_luaentity_get_properties(lua_State *L, u16 id,