summaryrefslogtreecommitdiff
path: root/ItemConfiguration.cpp
diff options
context:
space:
mode:
authorJapa Illo2012-04-05 09:20:23 +0200
committerJapa Illo2012-04-05 09:20:23 +0200
commitea2e9dc5618ff9fbf2a9bf772f40118e8ab1defd (patch)
tree3bd859d1b8919f8502219a146fe0ce2cef3125de /ItemConfiguration.cpp
parent80329a160e26950bd02298e450c44a99a9c21efd (diff)
downloadstonesense-ea2e9dc5618ff9fbf2a9bf772f40118e8ab1defd.tar.gz
stonesense-ea2e9dc5618ff9fbf2a9bf772f40118e8ab1defd.tar.bz2
stonesense-ea2e9dc5618ff9fbf2a9bf772f40118e8ab1defd.tar.xz
Fixed item subtypes, made creature happiness only show on dwarves.
Signed-off-by: Japa Illo <japa.mala.illo@gmail.com>
Diffstat (limited to 'ItemConfiguration.cpp')
-rw-r--r--ItemConfiguration.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/ItemConfiguration.cpp b/ItemConfiguration.cpp
index ebdeedb..fbab27d 100644
--- a/ItemConfiguration.cpp
+++ b/ItemConfiguration.cpp
@@ -68,8 +68,9 @@ bool parseItemElement( TiXmlElement* elemRoot, int basefile)
{
// get subtype string, if available
string sub;
- if(strGameSub)
- sub = strGameSub;
+ sub += strGameID;
+ sub += ":";
+ sub += strGameSub;
//process subtypes
ItemTypeInfo itemdef;
@@ -101,9 +102,9 @@ bool parseItemElement( TiXmlElement* elemRoot, int basefile)
{
if(contentLoader->itemConfigs[main_type]->subItems.size() <= subtype)
contentLoader->itemConfigs[main_type]->subItems.resize(subtype+1, NULL);
- if(!contentLoader->itemConfigs[main_type]->subItems[subtype]->configured)
+ if(!contentLoader->itemConfigs[main_type]->subItems[subtype])
{
- contentLoader->itemConfigs[main_type]->subItems[subtype]->configured = true;
+ contentLoader->itemConfigs[main_type]->subItems[subtype] = new ItemSubConfiguration;
contentLoader->itemConfigs[main_type]->subItems[subtype]->sprite = sprite;
}
}