Add isGay(df::unit*) method

develop
Chris Dombroski 2015-01-05 13:54:17 -05:00
parent 10fa55570e
commit 084bbc3162
1 changed files with 7 additions and 0 deletions

@ -67,6 +67,7 @@ using namespace std;
#include "df/general_ref_building_civzone_assignedst.h"
#include <df/creature_raw.h>
#include <df/caste_raw.h>
#include "df/unit_soul.h"
#include "df/viewscreen_dwarfmodest.h"
#include "modules/Translation.h"
@ -345,6 +346,7 @@ bool isHunter(df::unit* unit);
bool isOwnCiv(df::unit* unit);
bool isMerchant(df::unit* unit);
bool isForest(df::unit* unit);
bool isGay(df::unit* unit);
bool isActivityZone(df::building * building);
bool isPenPasture(df::building * building);
@ -705,6 +707,11 @@ int getUnitIndexFromId(df::unit* unit_)
return -1;
}
bool isGay(df::unit* unit)
{
return isFemale(unit) && unit->status.current_soul->orientation_flags.bits.romance_female || unit->status.current_soul->orientation_flags.bits.romance_male;
}
// dump some unit info
void unitInfo(color_ostream & out, df::unit* unit, bool verbose = false)
{