summaryrefslogtreecommitdiffstats
path: root/source/FurnaceEntity.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/FurnaceEntity.cpp46
1 files changed, 1 insertions, 45 deletions
diff --git a/source/FurnaceEntity.cpp b/source/FurnaceEntity.cpp
index d464749d8..f6727c555 100644
--- a/source/FurnaceEntity.cpp
+++ b/source/FurnaceEntity.cpp
@@ -280,51 +280,7 @@ void cFurnaceEntity::SetSlot(int a_Slot, const cItem & a_Item)
-#define READ(File, Var) \
- if (File.Read(&Var, sizeof(Var)) != sizeof(Var)) \
- { \
- LOGERROR("ERROR READING cFurnaceEntity %s FROM FILE (line %d)", #Var, __LINE__); \
- return false; \
- }
-
-bool cFurnaceEntity::LoadFromFile(cFile & f)
-{
- READ(f, m_PosX);
- READ(f, m_PosY);
- READ(f, m_PosZ);
-
- unsigned int NumSlots = 0;
- READ(f, NumSlots);
- m_Items = new cItem[ NumSlots ];
- for(unsigned int i = 0; i < NumSlots; i++)
- {
- cItem & Item = m_Items[i];
- READ(f, Item.m_ItemType);
- READ(f, Item.m_ItemCount);
- READ(f, Item.m_ItemDamage);
- }
- cItem CookingItem;
- READ(f, CookingItem.m_ItemType);
- READ(f, CookingItem.m_ItemCount);
- READ(f, CookingItem.m_ItemDamage);
- if (!CookingItem.IsEmpty())
- {
- m_CookingItem = new cItem(CookingItem);
- }
-
- READ(f, m_CookTime);
- READ(f, m_TimeCooked);
- READ(f, m_BurnTime);
- READ(f, m_TimeBurned);
-
- return true;
-}
-
-
-
-
-
-bool cFurnaceEntity::LoadFromJson( const Json::Value& a_Value )
+bool cFurnaceEntity::LoadFromJson(const Json::Value & a_Value)
{
m_PosX = a_Value.get("x", 0).asInt();
m_PosY = a_Value.get("y", 0).asInt();