|
|
@ -68,6 +68,7 @@ using namespace std;
|
|
|
|
#include <df/creature_raw.h>
|
|
|
|
#include <df/creature_raw.h>
|
|
|
|
#include <df/caste_raw.h>
|
|
|
|
#include <df/caste_raw.h>
|
|
|
|
#include "df/unit_soul.h"
|
|
|
|
#include "df/unit_soul.h"
|
|
|
|
|
|
|
|
#include "df/unit_wound.h"
|
|
|
|
#include "df/viewscreen_dwarfmodest.h"
|
|
|
|
#include "df/viewscreen_dwarfmodest.h"
|
|
|
|
#include "modules/Translation.h"
|
|
|
|
#include "modules/Translation.h"
|
|
|
|
|
|
|
|
|
|
|
@ -347,6 +348,7 @@ bool isOwnCiv(df::unit* unit);
|
|
|
|
bool isMerchant(df::unit* unit);
|
|
|
|
bool isMerchant(df::unit* unit);
|
|
|
|
bool isForest(df::unit* unit);
|
|
|
|
bool isForest(df::unit* unit);
|
|
|
|
bool isGay(df::unit* unit);
|
|
|
|
bool isGay(df::unit* unit);
|
|
|
|
|
|
|
|
bool isGelded(df::unit* unit);
|
|
|
|
|
|
|
|
|
|
|
|
bool isActivityZone(df::building * building);
|
|
|
|
bool isActivityZone(df::building * building);
|
|
|
|
bool isPenPasture(df::building * building);
|
|
|
|
bool isPenPasture(df::building * building);
|
|
|
@ -714,6 +716,21 @@ bool isGay(df::unit* unit)
|
|
|
|
|| ! isFemale(unit) && ! (orientation.whole & (orientation.mask_marry_female | orientation.mask_romance_female));
|
|
|
|
|| ! isFemale(unit) && ! (orientation.whole & (orientation.mask_marry_female | orientation.mask_romance_female));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isGelded(df::unit* unit)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
auto wounds = unit->body.wounds;
|
|
|
|
|
|
|
|
for(auto wound = wounds.begin(); wound != wounds.end(); ++wound)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
auto parts = (*wound)->parts;
|
|
|
|
|
|
|
|
for (auto part = parts.begin(); part != parts.end(); ++part)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ((*part)->flags2.bits.gelded)
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// dump some unit info
|
|
|
|
// dump some unit info
|
|
|
|
void unitInfo(color_ostream & out, df::unit* unit, bool verbose = false)
|
|
|
|
void unitInfo(color_ostream & out, df::unit* unit, bool verbose = false)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3481,7 +3498,8 @@ command_result autoButcher( color_ostream &out, bool verbose = false )
|
|
|
|
|| isAvailableForAdoption(unit)
|
|
|
|
|| isAvailableForAdoption(unit)
|
|
|
|
|| unit->name.has_name )
|
|
|
|
|| unit->name.has_name )
|
|
|
|
w->PushProtectedUnit(unit);
|
|
|
|
w->PushProtectedUnit(unit);
|
|
|
|
else if (isGay(unit))
|
|
|
|
else if ( isGay(unit)
|
|
|
|
|
|
|
|
|| isGelded(unit))
|
|
|
|
w->PushPriorityUnit(unit);
|
|
|
|
w->PushPriorityUnit(unit);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
w->PushUnit(unit);
|
|
|
|
w->PushUnit(unit);
|
|
|
|