diff options
author | Kahrl <kahrl@gmx.net> | 2011-11-29 17:15:18 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:58 +0200 |
commit | d6b30dd3a5df4b84a287305f807442064f4cf68d (patch) | |
tree | 73311c9e881cb691074d607e066f6745a981a79b /src/scriptapi.h | |
parent | 1c19f959db117d48538b93b5494d87d97515fdfb (diff) | |
download | minetest-d6b30dd3a5df4b84a287305f807442064f4cf68d.tar.gz minetest-d6b30dd3a5df4b84a287305f807442064f4cf68d.tar.bz2 minetest-d6b30dd3a5df4b84a287305f807442064f4cf68d.zip |
CraftItem rework and Lua interface
Diffstat (limited to 'src/scriptapi.h')
-rw-r--r-- | src/scriptapi.h | 13 |
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, |