]> git.lizzy.rs Git - minetest.git/blobdiff - src/script/lua_api/l_inventory.h
Support packing arbitrary graphs (#12289)
[minetest.git] / src / script / lua_api / l_inventory.h
index 91d41c0d02431584b0285877ac8f4d7c3c810ee8..6a75bac0f38e4e8a4fcd080dab8462e6ec1294e0 100644 (file)
@@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 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"
 
@@ -93,7 +92,7 @@ class InvRef : public ModApiBase {
        // 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);
 
@@ -107,13 +106,11 @@ class InvRef : public ModApiBase {
 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);
 };
 
@@ -121,10 +118,10 @@ class ModApiInventory : public ModApiBase {
 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_ */