3 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef CONTENT_NODEMETA_HEADER
21 #define CONTENT_NODEMETA_HEADER
23 #include "nodemetadata.h"
27 class SignNodeMetadata : public NodeMetadata
30 SignNodeMetadata(std::string text);
31 //~SignNodeMetadata();
33 virtual u16 typeId() const;
34 static NodeMetadata* create(std::istream &is);
35 virtual NodeMetadata* clone();
36 virtual void serializeBody(std::ostream &os);
37 virtual std::string infoText();
39 std::string getText(){ return m_text; }
40 void setText(std::string t){ m_text = t; }
46 class ChestNodeMetadata : public NodeMetadata
52 virtual u16 typeId() const;
53 static NodeMetadata* create(std::istream &is);
54 virtual NodeMetadata* clone();
55 virtual void serializeBody(std::ostream &os);
56 virtual std::string infoText();
57 virtual Inventory* getInventory() {return m_inventory;}
58 virtual bool nodeRemovalDisabled();
59 virtual std::string getInventoryDrawSpecString();
62 Inventory *m_inventory;
65 class FurnaceNodeMetadata : public NodeMetadata
68 FurnaceNodeMetadata();
69 ~FurnaceNodeMetadata();
71 virtual u16 typeId() const;
72 virtual NodeMetadata* clone();
73 static NodeMetadata* create(std::istream &is);
74 virtual void serializeBody(std::ostream &os);
75 virtual std::string infoText();
76 virtual Inventory* getInventory() {return m_inventory;}
77 virtual void inventoryModified();
78 virtual bool step(float dtime);
79 virtual std::string getInventoryDrawSpecString();
82 Inventory *m_inventory;
83 float m_step_accumulator;
84 float m_fuel_totaltime;
86 float m_src_totaltime;