aboutsummaryrefslogtreecommitdiff
path: root/src/scriptapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/scriptapi.h')
-rw-r--r--src/scriptapi.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scriptapi.h b/src/scriptapi.h
index e6570e764..fe9329d75 100644
--- a/src/scriptapi.h
+++ b/src/scriptapi.h
@@ -29,6 +29,7 @@ class ServerEnvironment;
class ServerActiveObject;
typedef struct lua_State lua_State;
struct LuaEntityProperties;
+struct PointedThing;
//class IGameDef;
void scriptapi_export(lua_State *L, Server *server);
@@ -60,6 +61,18 @@ void scriptapi_environment_on_generated(lua_State *L, v3s16 minp, v3s16 maxp);
void scriptapi_on_newplayer(lua_State *L, ServerActiveObject *player);
bool scriptapi_on_respawnplayer(lua_State *L, ServerActiveObject *player);
+/* craftitem */
+void scriptapi_add_craftitem(lua_State *L, const char *name);
+bool scriptapi_craftitem_on_drop(lua_State *L, const char *name,
+ ServerActiveObject *dropper, v3f pos,
+ bool &callback_exists);
+bool scriptapi_craftitem_on_place_on_ground(lua_State *L, const char *name,
+ ServerActiveObject *placer, v3f pos,
+ bool &callback_exists);
+bool scriptapi_craftitem_on_use(lua_State *L, const char *name,
+ ServerActiveObject *user, const PointedThing& pointed,
+ bool &callback_exists);
+
/* luaentity */
// Returns true if succesfully added into Lua; false otherwise.
bool scriptapi_luaentity_add(lua_State *L, u16 id, const char *name,