diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-04 15:13:19 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-04 15:13:19 +0300 |
commit | 4a92df6ff021f1bfa645f97fd551c648d1ef8e3b (patch) | |
tree | 6a1d12a56a2a57dbd84e3e660241916f3e1a2fe0 /src/nodemetadata.h | |
parent | 9e683fff50ba4fef407613adf8407b31adca4596 (diff) | |
download | minetest-4a92df6ff021f1bfa645f97fd551c648d1ef8e3b.tar.gz minetest-4a92df6ff021f1bfa645f97fd551c648d1ef8e3b.tar.bz2 minetest-4a92df6ff021f1bfa645f97fd551c648d1ef8e3b.zip |
Chests work now!
Diffstat (limited to 'src/nodemetadata.h')
-rw-r--r-- | src/nodemetadata.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nodemetadata.h b/src/nodemetadata.h index 21916677e..8877c2667 100644 --- a/src/nodemetadata.h +++ b/src/nodemetadata.h @@ -37,6 +37,8 @@ with this program; if not, write to the Free Software Foundation, Inc., - Text */ +class Inventory; + class NodeMetadata { public: @@ -52,7 +54,8 @@ public: virtual u16 typeId() const = 0; virtual NodeMetadata* clone() = 0; virtual void serializeBody(std::ostream &os) = 0; - virtual std::string infoText() { return "<todo: remove this text>"; } + virtual std::string infoText() {return "<todo: remove this text>";} + virtual Inventory* getInventory() {return NULL;} protected: static void registerType(u16 id, Factory f); @@ -83,14 +86,17 @@ class ChestNodeMetadata : public NodeMetadata { public: ChestNodeMetadata(); + ~ChestNodeMetadata(); virtual u16 typeId() const; static NodeMetadata* create(std::istream &is); virtual NodeMetadata* clone(); virtual void serializeBody(std::ostream &os); virtual std::string infoText(); + virtual Inventory* getInventory() {return m_inventory;} private: + Inventory *m_inventory; }; class NodeMetadataList |