diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-12-02 12:12:07 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-12-02 12:12:07 +0200 |
commit | 69bc9224dbfb5609af140d8ec5c791763e3f4295 (patch) | |
tree | fcd4732efd85f4323400e5be9a523db7d8e700e1 /src | |
parent | a17efe6e8f069de7a51c2fc5fd89ee3fbe65ff28 (diff) | |
download | minetest-69bc9224dbfb5609af140d8ec5c791763e3f4295.tar.gz minetest-69bc9224dbfb5609af140d8ec5c791763e3f4295.tar.bz2 minetest-69bc9224dbfb5609af140d8ec5c791763e3f4295.zip |
Rename "NodeItem"/"ToolItem"/"CraftItem" to "node"/"tool"/"craft"
Diffstat (limited to 'src')
-rw-r--r-- | src/inventory.cpp | 6 | ||||
-rw-r--r-- | src/inventory.h | 6 |
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<<"\" "; |