summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2012-08-20 01:29:56 +0400
committerPerttu Ahola <celeron55@gmail.com>2012-09-01 10:01:41 +0300
commit6a16075912d016926ee0361fb85f9979c119be52 (patch)
tree9f0b589efac5266eb51db71643e174187f83cf3e /src/inventory.h
parent43ebec2be1949aa5eac127df7cb902d37e4e461b (diff)
downloadminetest-6a16075912d016926ee0361fb85f9979c119be52.tar.gz
minetest-6a16075912d016926ee0361fb85f9979c119be52.tar.bz2
minetest-6a16075912d016926ee0361fb85f9979c119be52.zip
Add InventoryList width property & allow custom crafting grids.
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inventory.h b/src/inventory.h
index a3c598256..5f90183d2 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -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;
};