diff options
| author | Caldfir | 2012-03-24 16:04:46 -0700 |
|---|---|---|
| committer | Caldfir | 2012-03-24 16:04:46 -0700 |
| commit | 40b6bd57ed1dd58c93c57661555d54f4aefc03a9 (patch) | |
| tree | 1a190cfeefa3afd914ee1ee681eb19ebc99a4883 /Creatures.cpp | |
| parent | 4281f2672bba95491feaf2820232802ea389e6b7 (diff) | |
| download | stonesense-40b6bd57ed1dd58c93c57661555d54f4aefc03a9.tar.gz stonesense-40b6bd57ed1dd58c93c57661555d54f4aefc03a9.tar.bz2 stonesense-40b6bd57ed1dd58c93c57661555d54f4aefc03a9.tar.xz | |
Updated stuff, and added in a 'Military' special attribute to the creature configuration.
Diffstat (limited to 'Creatures.cpp')
| -rw-r--r-- | Creatures.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Creatures.cpp b/Creatures.cpp index 03b4033..0c6aead 100644 --- a/Creatures.cpp +++ b/Creatures.cpp @@ -13,6 +13,8 @@ #include "df/itemimprovement.h"
#include "df/itemimprovement_threadst.h"
+#include "df/profession.h"
+
//vector<t_matgloss> v_creatureNames;
//vector<CreatureConfiguration> creatureTypes;
@@ -228,6 +230,7 @@ bool IsCreatureVisible( df::unit* c ){ return true;
}
+
void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){
vector<int> statusIcons;
@@ -286,7 +289,7 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){ }
offsety += config.show_creature_moods ? 16 : 0;
-
+
if(config.show_creature_jobs)
{
unsigned int sheetx = 16 * (creature->profession % 7);
@@ -507,6 +510,12 @@ CreatureConfiguration *GetCreatureConfig( t_unit* c ){ {
if (testConfig->special == eCSC_Zombie && !c->flags1.bits.zombie) creatureMatchesSpecial = false;
if (testConfig->special == eCSC_Skeleton && !c->flags1.bits.skeleton) creatureMatchesSpecial = false;
+ if (testConfig->special == eCSC_Military)
+ {
+ df::profession profession = (df::profession) c->profession;
+ if(!ENUM_ATTR(profession,military,profession))
+ creatureMatchesSpecial = false;
+ }
if (testConfig->special == eCSC_Normal && (c->flags1.bits.zombie || c->flags1.bits.skeleton)) creatureMatchesSpecial = false;
}
if(!creatureMatchesSpecial) continue;
|
