Stealing animals from traders is bad.

develop
Kelly Martin 2012-04-07 23:25:40 -05:00
parent 2e6ee0ac84
commit de960e65f5
1 changed files with 9 additions and 0 deletions

@ -309,6 +309,7 @@ bool isTrained(df::unit* creature);
bool isWar(df::unit* creature); bool isWar(df::unit* creature);
bool isHunter(df::unit* creature); bool isHunter(df::unit* creature);
bool isOwnCiv(df::unit* creature); bool isOwnCiv(df::unit* creature);
bool isMerchant(df::unit* creature);
bool isActivityZone(df::building * building); bool isActivityZone(df::building * building);
bool isPenPasture(df::building * building); bool isPenPasture(df::building * building);
@ -344,6 +345,11 @@ bool isDead(df::unit* unit)
return unit->flags1.bits.dead; return unit->flags1.bits.dead;
} }
bool isMerchant(df::unit* unit)
{
return unit->flags1.bits.merchant;
}
bool isMarkedForSlaughter(df::unit* unit) bool isMarkedForSlaughter(df::unit* unit)
{ {
return unit->flags2.bits.slaughter; return unit->flags2.bits.slaughter;
@ -1614,6 +1620,9 @@ command_result df_zone (color_ostream &out, vector <string> & parameters)
if (isDead(unit)) if (isDead(unit))
continue; continue;
// ignore merchant units
if (isMerchant(unit))
continue;
if(find_race && getRaceName(unit) != target_race) if(find_race && getRaceName(unit) != target_race)
continue; continue;
// ignore own dwarves by default // ignore own dwarves by default