aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_inventory.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-08-11 04:09:45 +0200
committerKahrl <kahrl@gmx.net>2013-08-14 21:03:33 +0200
commit4e1f50035e860a00636ca5d804c267119df99601 (patch)
treec6cab522305ef2a5b9cfdb3685340d57590f1ff1 /src/script/lua_api/l_inventory.h
parent6228d634fb31d1ce925d1fdc2dac022629a007ef (diff)
downloadminetest-4e1f50035e860a00636ca5d804c267119df99601.tar.gz
minetest-4e1f50035e860a00636ca5d804c267119df99601.tar.bz2
minetest-4e1f50035e860a00636ca5d804c267119df99601.zip
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu
Diffstat (limited to 'src/script/lua_api/l_inventory.h')
-rw-r--r--src/script/lua_api/l_inventory.h30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/script/lua_api/l_inventory.h b/src/script/lua_api/l_inventory.h
index 83e8039b8..ed3249e5f 100644
--- a/src/script/lua_api/l_inventory.h
+++ b/src/script/lua_api/l_inventory.h
@@ -20,23 +20,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef L_INVENTORY_H_
#define L_INVENTORY_H_
-extern "C" {
-#include <lua.h>
-#include <lauxlib.h>
-}
+#include "lua_api/l_base.h"
-#include "inventorymanager.h"
-#include "player.h"
-#include "serverobject.h"
#include "inventory.h"
+#include "inventorymanager.h"
+
+class Player;
-#include "lua_api/l_base.h"
/*
InvRef
*/
-class InvRef
-{
+class InvRef : public ModApiBase {
private:
InventoryLocation m_loc;
@@ -116,22 +111,19 @@ public:
static void Register(lua_State *L);
};
-class ModApiInventory
- : public ModApiBase
-{
-public:
- ModApiInventory();
-
- bool Initialize(lua_State *L, int top);
-
+class ModApiInventory : public ModApiBase {
+private:
static int l_create_detached_inventory_raw(lua_State *L);
+
static int l_get_inventory(lua_State *L);
-private:
+
static void inventory_set_list_from_lua(Inventory *inv, const char *name,
lua_State *L, int tableindex, int forcesize);
static void inventory_get_list_to_lua(Inventory *inv, const char *name,
lua_State *L);
+public:
+ static void Initialize(lua_State *L, int top);
};
#endif /* L_INVENTORY_H_ */