Update logic for zone type checks

develop
Roxy 2023-02-06 15:37:27 -05:00
parent c0358d642d
commit a38246aaa4
1 changed files with 7 additions and 12 deletions

@ -1589,27 +1589,23 @@ bool Buildings::isPenPasture(df::building * building)
if (!isActivityZone(building))
return false;
/* TODO: understand how this changes for v50
return ((df::building_civzonest*) building)->zone_flags.bits.pen_pasture != 0;
*/ return false;
return ((df::building_civzonest*)building)->type == civzone_type::Pen;
}
bool Buildings::isPitPond(df::building * building)
{
if (!isActivityZone(building))
return false;
/* TODO: understand how this changes for v50
return ((df::building_civzonest*) building)->zone_flags.bits.pit_pond != 0;
*/ return false;
return ((df::building_civzonest*)building)->type == civzone_type::Pond;
}
bool Buildings::isActive(df::building * building)
{
if (!isActivityZone(building))
return false;
/* TODO: understand how this changes for v50
return ((df::building_civzonest*) building)->zone_flags.bits.active != 0;
*/ return false;
return ((df::building_civzonest*)building)->is_active == 8;
}
bool Buildings::isHospital(df::building * building)
@ -1625,9 +1621,8 @@ bool Buildings::isHospital(df::building * building)
{
if (!isActivityZone(building))
return false;
/* TODO: understand how this changes for v50
return ((df::building_civzonest*) building)->zone_flags.bits.animal_training != 0;
*/ return false;
return ((df::building_civzonest*)building)->type == civzone_type::AnimalTraining;
}
// returns building of pen/pit at cursor position (NULL if nothing found)