summaryrefslogtreecommitdiff
path: root/src/scriptapi.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-01-12 06:10:39 +0100
committerKahrl <kahrl@gmx.net>2012-01-12 06:10:39 +0100
commit6a76c226e10e92c3e3339096f07f8ab065e2098b (patch)
tree396d9083f5f76ebb5ba96df113ba68046c2487df /src/scriptapi.h
parent569156b01302ea4ba45d11ff5524b62dbc6a9aa0 (diff)
downloadminetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.tar.gz
minetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.tar.bz2
minetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.zip
The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
Diffstat (limited to 'src/scriptapi.h')
-rw-r--r--src/scriptapi.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/scriptapi.h b/src/scriptapi.h
index af8afa3d9..198f60525 100644
--- a/src/scriptapi.h
+++ b/src/scriptapi.h
@@ -27,11 +27,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class Server;
class ServerEnvironment;
class ServerActiveObject;
+class ServerRemotePlayer;
typedef struct lua_State lua_State;
struct LuaEntityProperties;
+class ItemStack;
struct PointedThing;
//class IGameDef;
-class ServerRemotePlayer;
void scriptapi_export(lua_State *L, Server *server);
bool scriptapi_loadmod(lua_State *L, const std::string &scriptpath,
@@ -66,17 +67,13 @@ void scriptapi_on_dieplayer(lua_State *L, ServerActiveObject *player);
bool scriptapi_on_respawnplayer(lua_State *L, ServerActiveObject *player);
void scriptapi_get_creative_inventory(lua_State *L, ServerRemotePlayer *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);
+/* item callbacks */
+bool scriptapi_item_on_drop(lua_State *L, ItemStack &item,
+ ServerActiveObject *dropper, v3f pos);
+bool scriptapi_item_on_place(lua_State *L, ItemStack &item,
+ ServerActiveObject *placer, const PointedThing &pointed);
+bool scriptapi_item_on_use(lua_State *L, ItemStack &item,
+ ServerActiveObject *user, const PointedThing &pointed);
/* luaentity */
// Returns true if succesfully added into Lua; false otherwise.