- return true;
-}
-std::string LockingChestNodeMetadata::getInventoryDrawSpecString()
-{
- return
- "invsize[8,9;]"
- "list[current_name;0;0,0;8,4;]"
- "list[current_player;main;0,5;8,4;]";
-}
-
-/*
- FurnaceNodeMetadata
-*/
-
-// Prototype
-FurnaceNodeMetadata proto_FurnaceNodeMetadata;
-
-FurnaceNodeMetadata::FurnaceNodeMetadata()
-{
- NodeMetadata::registerType(typeId(), create);
-
- m_inventory = new Inventory();
- m_inventory->addList("fuel", 1);
- m_inventory->addList("src", 1);
- m_inventory->addList("dst", 4);
-
- m_step_accumulator = 0;
- m_fuel_totaltime = 0;
- m_fuel_time = 0;
- m_src_totaltime = 0;
- m_src_time = 0;
-}
-FurnaceNodeMetadata::~FurnaceNodeMetadata()
-{
- delete m_inventory;
-}
-u16 FurnaceNodeMetadata::typeId() const
-{
- return CONTENT_FURNACE;
-}
-NodeMetadata* FurnaceNodeMetadata::clone()
-{
- FurnaceNodeMetadata *d = new FurnaceNodeMetadata();
- *d->m_inventory = *m_inventory;
- return d;
-}
-NodeMetadata* FurnaceNodeMetadata::create(std::istream &is)
-{
- FurnaceNodeMetadata *d = new FurnaceNodeMetadata();
-
- d->m_inventory->deSerialize(is);
-
- int temp;
- is>>temp;
- d->m_fuel_totaltime = (float)temp/10;
- is>>temp;
- d->m_fuel_time = (float)temp/10;
-
- return d;
-}
-void FurnaceNodeMetadata::serializeBody(std::ostream &os)
-{
- m_inventory->serialize(os);
- os<<itos(m_fuel_totaltime*10)<<" ";
- os<<itos(m_fuel_time*10)<<" ";
-}
-std::string FurnaceNodeMetadata::infoText()
-{
- //return "Furnace";
- if(m_fuel_time >= m_fuel_totaltime)