diff options
| -rw-r--r-- | Block.cpp | 6 | ||||
| -rw-r--r-- | Creatures.cpp | 5 | ||||
| -rw-r--r-- | ItemConfiguration.cpp | 9 | ||||
| -rw-r--r-- | ItemConfiguration.h | 2 | ||||
| -rw-r--r-- | resources/items/greiger items.zip | bin | 0 -> 962 bytes | |||
| -rw-r--r-- | resources/items/greiger items/Grei_items.png | bin | 0 -> 592 bytes | |||
| -rw-r--r-- | resources/items/greiger items/Grei_items.xml | 5 | ||||
| -rw-r--r-- | resources/items/index.txt | 1 |
8 files changed, 18 insertions, 10 deletions
@@ -292,10 +292,10 @@ void Block::Draw() {
if(
contentLoader->itemConfigs[Item.item.type] &&
- (Item.item.type < contentLoader->itemConfigs[Item.item.type]->subItems.size()) &&
- contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.type])
+ (Item.item.index < contentLoader->itemConfigs[Item.item.type]->subItems.size()) &&
+ contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.index])
{
- contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.type]->sprite.draw_world(x, y, z, this);
+ contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.index]->sprite.draw_world(x, y, z, this);
}
else if (
contentLoader->itemConfigs[Item.item.type] &&
diff --git a/Creatures.cpp b/Creatures.cpp index ba19970..82eb801 100644 --- a/Creatures.cpp +++ b/Creatures.cpp @@ -15,6 +15,9 @@ #include "df/profession.h"
+#include "df/creature_raw.h"
+#include "df/caste_raw.h"
+
//vector<t_matgloss> v_creatureNames;
//vector<CreatureConfiguration> creatureTypes;
@@ -235,7 +238,7 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){ vector<int> statusIcons;
//if(config.show_creature_happiness)
- if(config.show_creature_moods)
+ if(config.show_creature_moods && df::creature_raw::find(creature->race)->caste[creature->caste]->flags.is_set(caste_raw_flags::CAN_SPEAK))
{
if(creature->happiness == 0)
statusIcons.push_back(6);
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; } } diff --git a/ItemConfiguration.h b/ItemConfiguration.h index 92ea46b..f66d518 100644 --- a/ItemConfiguration.h +++ b/ItemConfiguration.h @@ -6,8 +6,6 @@ class ItemSubConfiguration { public: c_sprite sprite; - - bool configured; }; class ItemConfiguration diff --git a/resources/items/greiger items.zip b/resources/items/greiger items.zip Binary files differnew file mode 100644 index 0000000..dd5486d --- /dev/null +++ b/resources/items/greiger items.zip diff --git a/resources/items/greiger items/Grei_items.png b/resources/items/greiger items/Grei_items.png Binary files differnew file mode 100644 index 0000000..454f8b2 --- /dev/null +++ b/resources/items/greiger items/Grei_items.png diff --git a/resources/items/greiger items/Grei_items.xml b/resources/items/greiger items/Grei_items.xml new file mode 100644 index 0000000..b197955 --- /dev/null +++ b/resources/items/greiger items/Grei_items.xml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<items file="Grei_items.png"> + <item game_type="BIN" sheetIndex="0" color="item" /> + <item game_type="TOOL" game_subtype="ITEM_TOOL_LARGE_POT" sheetIndex="1" color="item" /> +</items> diff --git a/resources/items/index.txt b/resources/items/index.txt index 2d1ed4a..c8e0f13 100644 --- a/resources/items/index.txt +++ b/resources/items/index.txt @@ -1 +1,2 @@ +greiger items/Grei_items.xml items.xml |
