diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-05 10:59:48 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-05 10:59:48 +0300 |
commit | d6d811f97bc921b11da735fda15b07de180b298b (patch) | |
tree | 32d09f6763819253ac78901f236d5fb5396cc1ae /src/inventory.h | |
parent | d1d57cf5c34c9a4626fd8e3b40db3ea321b40335 (diff) | |
download | minetest-d6d811f97bc921b11da735fda15b07de180b298b.tar.gz minetest-d6d811f97bc921b11da735fda15b07de180b298b.tar.bz2 minetest-d6d811f97bc921b11da735fda15b07de180b298b.zip |
A more robust format for node metadata
Diffstat (limited to 'src/inventory.h')
-rw-r--r-- | src/inventory.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/inventory.h b/src/inventory.h index 0cbd97abc..d110f92c0 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -72,6 +72,7 @@ public: { m_count = count; } + // This should return something else for stackable items virtual u16 freeSpace() { return 0; @@ -87,6 +88,14 @@ public: m_count -= count; } + /* + Other properties + */ + // Time of cooking + virtual float getCookTime(){return 3.0;} + // Result of cooking + virtual InventoryItem *createCookResult(){return NULL;} + protected: u16 m_count; }; @@ -149,6 +158,10 @@ public: return QUANTITY_ITEM_MAX_COUNT - m_count; } /* + Other properties + */ + InventoryItem *createCookResult(); + /* Special methods */ u8 getMaterial() @@ -428,6 +441,7 @@ public: u32 getSize(); // Count used slots u32 getUsedSlots(); + u32 getFreeSlots(); // Get pointer to item InventoryItem * getItem(u32 i); |