Falling sand and gravel
[oweals/minetest.git] / src / scriptapi.h
index de8eb6abef3de042b0b50724486b39361eda583c..e7ff84039e8aea72d26327f2754e4ae15b0a4aff 100644 (file)
@@ -22,12 +22,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes.h"
 #include <string>
+#include "mapnode.h"
 
 class Server;
 class ServerEnvironment;
 class ServerActiveObject;
 typedef struct lua_State lua_State;
 struct LuaEntityProperties;
+//class IGameDef;
 
 void scriptapi_export(lua_State *L, Server *server);
 void scriptapi_add_environment(lua_State *L, ServerEnvironment *env);
@@ -36,7 +38,12 @@ void scriptapi_add_object_reference(lua_State *L, ServerActiveObject *cobj);
 void scriptapi_rm_object_reference(lua_State *L, ServerActiveObject *cobj);
 
 /* environment */
+// On environment step
 void scriptapi_environment_step(lua_State *L, float dtime);
+// After adding node
+void scriptapi_environment_on_placenode(lua_State *L, v3s16 p, MapNode newnode);
+// After removing node
+void scriptapi_environment_on_dignode(lua_State *L, v3s16 p, MapNode oldnode);
 
 /* luaentity */
 // Returns true if succesfully added into Lua; false otherwise.
@@ -48,7 +55,7 @@ void scriptapi_luaentity_get_properties(lua_State *L, u16 id,
                LuaEntityProperties *prop);
 void scriptapi_luaentity_step(lua_State *L, u16 id, float dtime);
 void scriptapi_luaentity_punch(lua_State *L, u16 id,
-               ServerActiveObject *clicker);
+               ServerActiveObject *puncher);
 void scriptapi_luaentity_rightclick(lua_State *L, u16 id,
                ServerActiveObject *clicker);