aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inventory.cpp6
-rw-r--r--src/inventory.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 645e02d9c..1e1e27c82 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -99,7 +99,7 @@ InventoryItem* InventoryItem::deSerialize(std::istream &is, IGameDef *gamedef)
throw SerializationError("Too large material number");
return new MaterialItem(gamedef, material, count);
}
- else if(name == "NodeItem" || name == "MaterialItem3")
+ else if(name == "node" || name == "NodeItem" || name == "MaterialItem3")
{
std::string all;
std::getline(is, all, '\n');
@@ -126,7 +126,7 @@ InventoryItem* InventoryItem::deSerialize(std::istream &is, IGameDef *gamedef)
std::getline(is, inventorystring, '|');
throw SerializationError("MBOItem not supported anymore");
}
- else if(name == "CraftItem")
+ else if(name == "craft" || name == "CraftItem")
{
std::string all;
std::getline(is, all, '\n');
@@ -148,7 +148,7 @@ InventoryItem* InventoryItem::deSerialize(std::istream &is, IGameDef *gamedef)
count = 1;
return new CraftItem(gamedef, subname, count);
}
- else if(name == "ToolItem")
+ else if(name == "tool" || name == "ToolItem")
{
std::string all;
std::getline(is, all, '\n');
diff --git a/src/inventory.h b/src/inventory.h
index 24591f33f..93a29764c 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -158,7 +158,7 @@ public:
}
virtual void serialize(std::ostream &os) const
{
- os<<"NodeItem";
+ os<<"node";
os<<" \"";
os<<m_nodename;
os<<"\" ";
@@ -249,7 +249,7 @@ public:
}
virtual void serialize(std::ostream &os) const
{
- os<<getName();
+ os<<"craft";
os<<" \"";
os<<m_subname;
os<<"\" ";
@@ -345,7 +345,7 @@ public:
}
virtual void serialize(std::ostream &os) const
{
- os<<getName();
+ os<<"tool";
os<<" \"";
os<<m_toolname;
os<<"\" ";