51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_INVENTORY_H_
-#define L_INVENTORY_H_
+#pragma once
#include "lua_api/l_base.h"
// Returns true if the item completely fits into the list
static int l_room_for_item(lua_State *L);
- // contains_item(self, listname, itemstack or itemstring or table or nil) -> true/false
+ // contains_item(self, listname, itemstack or itemstring or table or nil, [match_meta]) -> true/false
// Returns true if the list contains the given count of the given item name
static int l_contains_item(lua_State *L);
public:
InvRef(const InventoryLocation &loc);
- ~InvRef();
+ ~InvRef() = default;
// Creates an InvRef and leaves it on top of stack
// Not callable from Lua; all references are created on the C side.
static void create(lua_State *L, const InventoryLocation &loc);
- static void createPlayer(lua_State *L, RemotePlayer *player);
- static void createNodeMeta(lua_State *L, v3s16 p);
static void Register(lua_State *L);
};
private:
static int l_create_detached_inventory_raw(lua_State *L);
+ static int l_remove_detached_inventory_raw(lua_State *L);
+
static int l_get_inventory(lua_State *L);
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif /* L_INVENTORY_H_ */