diff --git a/source/glest_game/types/faction_type.cpp b/source/glest_game/types/faction_type.cpp index 2ce40783..6dd4617a 100644 --- a/source/glest_game/types/faction_type.cpp +++ b/source/glest_game/types/faction_type.cpp @@ -1029,56 +1029,5 @@ string FactionType::getName(bool translatedValue) const { return lang.getTechTreeString("FactionName_" + name,name.c_str()); } -void FactionType::saveGame(XmlNode *rootNode) { - std::map mapTagReplacements; - XmlNode *factionTypeNode = rootNode->addChild("FactionType"); - -// string name; - factionTypeNode->addAttribute("name",name, mapTagReplacements); -// UnitTypes unitTypes; - for(unsigned int i = 0; i < unitTypes.size(); ++i) { - XmlNode *unitTypesNode = factionTypeNode->addChild("unitTypes"); - unitTypesNode->addAttribute("name",unitTypes[i].getName(false), mapTagReplacements); - } -// UpgradeTypes upgradeTypes; - for(unsigned int i = 0; i < upgradeTypes.size(); ++i) { - XmlNode *upgradeTypesNode = factionTypeNode->addChild("upgradeTypes"); - upgradeTypesNode->addAttribute("name",upgradeTypes[i].getName(false), mapTagReplacements); - } - -// StartingUnits startingUnits; - for(unsigned int i = 0; i < startingUnits.size(); ++i) { - XmlNode *startingUnitsNode = factionTypeNode->addChild("startingUnits"); - startingUnitsNode->addAttribute("name",startingUnits[i].first->getName(false), mapTagReplacements); - startingUnitsNode->addAttribute("count",intToStr(startingUnits[i].second), mapTagReplacements); - } - -// Resources startingResources; - for(unsigned int i = 0; i < startingResources.size(); ++i) { - startingResources[i].saveGame(factionTypeNode); - } - -// StrSound *music; -// FactionPersonalityType personalityType; - factionTypeNode->addAttribute("personalityType",intToStr(personalityType), mapTagReplacements); -// std::map > mapAIBehaviorUnitCategories; - for(std::map >::iterator iterMap = mapAIBehaviorUnitCategories.begin(); - iterMap != mapAIBehaviorUnitCategories.end(); ++iterMap) { - - std::vector &vct = iterMap->second; - for(unsigned int i = 0; i < vct.size(); ++i) { - PairPUnitTypeInt &item = vct[i]; - - XmlNode *mapAIBehaviorUnitCategoriesNode = factionTypeNode->addChild("mapAIBehaviorUnitCategories"); - mapAIBehaviorUnitCategoriesNode->addAttribute("key",intToStr(iterMap->first), mapTagReplacements); - mapAIBehaviorUnitCategoriesNode->addAttribute("unitType",item.first->getName(false), mapTagReplacements); - mapAIBehaviorUnitCategoriesNode->addAttribute("count",intToStr(item.second), mapTagReplacements); - } - } -// std::vector vctAIBehaviorUpgrades; - //for(unsigned int i = 0; i < vctAIBehaviorUpgrades.size(); ++i) { - // vctAIBehaviorUpgrades[i]->saveGame(factionTypeNode); - //} -} }}//end namespace diff --git a/source/glest_game/types/faction_type.h b/source/glest_game/types/faction_type.h index 386df6bc..abc0ee84 100644 --- a/source/glest_game/types/faction_type.h +++ b/source/glest_game/types/faction_type.h @@ -156,7 +156,6 @@ public: void deletePixels(); bool factionUsesResourceType(const ResourceType *rt) const; - void saveGame(XmlNode *rootNode); }; }}//end namespace