Merge pull request #384 from lethosor/dwarfmonitor-0.40.14+

Make dwarfmonitor compile for 0.40.14+
develop
expwnent 2014-11-09 00:33:14 -05:00
commit 8e492b1669
2 changed files with 18 additions and 18 deletions

@ -110,7 +110,7 @@ if (BUILD_SUPPORTED)
DFHACK_PLUGIN(digFlood digFlood.cpp)
add_subdirectory(diggingInvaders)
DFHACK_PLUGIN(drybuckets drybuckets.cpp)
#DFHACK_PLUGIN(dwarfmonitor dwarfmonitor.cpp)
DFHACK_PLUGIN(dwarfmonitor dwarfmonitor.cpp)
DFHACK_PLUGIN(embark-tools embark-tools.cpp)
DFHACK_PLUGIN(eventful eventful.cpp LINK_LIBRARIES lua)
DFHACK_PLUGIN(fastdwarf fastdwarf.cpp)

@ -84,20 +84,20 @@ static color_value monitor_colors[] =
static int get_happiness_cat(df::unit *unit)
{
int happy = unit->status.happiness;
if (happy == 0) // miserable
int stress = unit->status.current_soul->personality.stress_level;
if (stress >= 500000)
return 0;
else if (happy <= 25) // very unhappy
else if (stress >= 250000)
return 1;
else if (happy <= 50) // unhappy
else if (stress >= 100000)
return 2;
else if (happy <= 75) // fine
else if (stress >= 60000)
return 3;
else if (happy <= 125) // quite content
else if (stress >= 30000)
return 4;
else if (happy <= 150) // happy
else if (stress >= 0)
return 5;
else // ecstatic
else
return 6;
}