summaryrefslogtreecommitdiff
path: root/ContentBuildingReader.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2012-02-19 15:36:30 +0100
committerPetr Mrázek2012-02-19 15:36:30 +0100
commite26123d19486517a96776352ced547c8e2afe0b4 (patch)
tree922beedd87b362d0cfe58883ebed4c646c6c920a /ContentBuildingReader.cpp
parent952e5d78ab6160be0e13446b0beabef301542848 (diff)
downloadstonesense-e26123d19486517a96776352ced547c8e2afe0b4.tar.gz
stonesense-e26123d19486517a96776352ced547c8e2afe0b4.tar.bz2
stonesense-e26123d19486517a96776352ced547c8e2afe0b4.tar.xz
Allow generic building definitions.
Diffstat (limited to 'ContentBuildingReader.cpp')
-rw-r--r--ContentBuildingReader.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/ContentBuildingReader.cpp b/ContentBuildingReader.cpp
index 78a5d8a..41c2b92 100644
--- a/ContentBuildingReader.cpp
+++ b/ContentBuildingReader.cpp
@@ -116,14 +116,14 @@ int parseConditionNode(ConditionalNode* node, TiXmlElement* elemCondition, bool
{
contentError("Unable to add subcondition",elemCondition);
delete(cond);
- return 0;
+ return 0;
}
return 1;
}
else if (!silent)
{
contentError("Misplaced or invalid element in Condition",elemCondition);
- return 0;
+ return 0;
}
return -1;
}
@@ -148,7 +148,7 @@ inline bool readNode(SpriteNode* node, TiXmlElement* elemNode, TiXmlElement* ele
if (!oldSibling)
{
contentError("Misplaced or invalid element in SpriteNode",elemNode);
- return false;
+ return false;
}
oldSibling->addElse(block);
}
@@ -331,8 +331,8 @@ bool addSingleBuildingConfig( TiXmlElement* elemRoot, vector<BuildingConfigurat
{
if(!strGameSub)
{
- contentError("<building> missing game_subtype attribute",elemRoot);
- return false;
+ contentError("<building> Is generic - game_subtype missing.",elemRoot);
+ break;
}
FOR_ENUM_ITEMS(furnace_type,i)
{
@@ -355,8 +355,8 @@ bool addSingleBuildingConfig( TiXmlElement* elemRoot, vector<BuildingConfigurat
{
if(!strGameSub)
{
- contentError("<building> missing game_subtype attribute",elemRoot);
- return false;
+ contentError("<building> Is generic - game_subtype missing.",elemRoot);
+ break;
}
FOR_ENUM_ITEMS(construction_type,i)
{
@@ -377,8 +377,8 @@ bool addSingleBuildingConfig( TiXmlElement* elemRoot, vector<BuildingConfigurat
{
if(!strGameSub)
{
- contentError("<building> missing game_subtype attribute",elemRoot);
- return false;
+ contentError("<building> Is generic - game_subtype missing.",elemRoot);
+ break;
}
FOR_ENUM_ITEMS(siegeengine_type,i)
{
@@ -399,8 +399,8 @@ bool addSingleBuildingConfig( TiXmlElement* elemRoot, vector<BuildingConfigurat
{
if(!strGameSub)
{
- contentError("<building> missing game_subtype attribute",elemRoot);
- return false;
+ contentError("<building> Is generic - game_subtype missing.",elemRoot);
+ break;
}
FOR_ENUM_ITEMS(shop_type,i)
{
@@ -421,8 +421,8 @@ bool addSingleBuildingConfig( TiXmlElement* elemRoot, vector<BuildingConfigurat
{
if(!strGameSub)
{
- contentError("<building> missing game_subtype attribute",elemRoot);
- return false;
+ contentError("<building> Is generic - game_subtype missing.",elemRoot);
+ break;
}
FOR_ENUM_ITEMS(workshop_type,i)
{