1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef

This commit is contained in:
Kahrl 2012-01-12 06:10:39 +01:00
parent 569156b013
commit 6a76c226e1
65 changed files with 7232 additions and 7282 deletions

View file

@ -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.