summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-07 12:30:30 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-07 12:30:30 +0200
commitd6cb6e0423fe38478c69f5d249882a01d727f0ed (patch)
tree5058b8901bc482a1711f537618a04be5791c6994 /src/Item.cpp
parentRename CanRepairWithItem to CanRepairWithRawMaterial and rename Size() to Count() (diff)
downloadcuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.tar
cuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.tar.gz
cuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.tar.bz2
cuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.tar.lz
cuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.tar.xz
cuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.tar.zst
cuberite-d6cb6e0423fe38478c69f5d249882a01d727f0ed.zip
Diffstat (limited to '')
-rw-r--r--src/Item.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index 7e472f6d8..d32164bc4 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -151,6 +151,8 @@ void cItem::GetJson(Json::Value & a_OutValue) const
a_OutValue["Colours"] = m_FireworkItem.ColoursToString(m_FireworkItem);
a_OutValue["FadeColours"] = m_FireworkItem.FadeColoursToString(m_FireworkItem);
}
+
+ a_OutValue["RepairCost"] = m_RepairCost;
}
}
@@ -179,6 +181,8 @@ void cItem::FromJson(const Json::Value & a_Value)
m_FireworkItem.ColoursFromString(a_Value.get("Colours", "").asString(), m_FireworkItem);
m_FireworkItem.FadeColoursFromString(a_Value.get("FadeColours", "").asString(), m_FireworkItem);
}
+
+ m_RepairCost = (unsigned short)a_Value.get("RepairCost", 0).asInt();
}
}