mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add InventoryList width property & allow custom crafting grids.
This commit is contained in:
parent
43ebec2be1
commit
6a16075912
7 changed files with 69 additions and 8 deletions
|
@ -176,6 +176,7 @@ public:
|
|||
~InventoryList();
|
||||
void clearItems();
|
||||
void setSize(u32 newsize);
|
||||
void setWidth(u32 newWidth);
|
||||
void setName(const std::string &name);
|
||||
void serialize(std::ostream &os) const;
|
||||
void deSerialize(std::istream &is);
|
||||
|
@ -185,6 +186,7 @@ public:
|
|||
|
||||
const std::string &getName() const;
|
||||
u32 getSize() const;
|
||||
u32 getWidth() const;
|
||||
// Count used slots
|
||||
u32 getUsedSlots() const;
|
||||
u32 getFreeSlots() const;
|
||||
|
@ -240,7 +242,7 @@ public:
|
|||
|
||||
private:
|
||||
std::vector<ItemStack> m_items;
|
||||
u32 m_size;
|
||||
u32 m_size, m_width;
|
||||
std::string m_name;
|
||||
IItemDefManager *m_itemdef;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue