X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fscript%2Flua_api%2Fl_inventory.h;h=6a75bac0f38e4e8a4fcd080dab8462e6ec1294e0;hb=7f58887ae33893c981fbdff23d4e1fa4a11c32e4;hp=91d41c0d02431584b0285877ac8f4d7c3c810ee8;hpb=41c54830242269de073e4a0c10d1775dfdf6811d;p=minetest.git diff --git a/src/script/lua_api/l_inventory.h b/src/script/lua_api/l_inventory.h index 91d41c0d0..6a75bac0f 100644 --- a/src/script/lua_api/l_inventory.h +++ b/src/script/lua_api/l_inventory.h @@ -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_ */