From 69bc9224dbfb5609af140d8ec5c791763e3f4295 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 2 Dec 2011 12:12:07 +0200 Subject: Rename "NodeItem"/"ToolItem"/"CraftItem" to "node"/"tool"/"craft" --- src/inventory.cpp | 6 +++--- src/inventory.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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<