|
|
@ -1589,45 +1589,31 @@ bool Buildings::isPenPasture(df::building * building)
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
/* TODO: understand how this changes for v50
|
|
|
|
return ((df::building_civzonest*)building)->type == civzone_type::Pen;
|
|
|
|
return ((df::building_civzonest*) building)->zone_flags.bits.pen_pasture != 0;
|
|
|
|
|
|
|
|
*/ return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Buildings::isPitPond(df::building * building)
|
|
|
|
bool Buildings::isPitPond(df::building * building)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
/* TODO: understand how this changes for v50
|
|
|
|
|
|
|
|
return ((df::building_civzonest*) building)->zone_flags.bits.pit_pond != 0;
|
|
|
|
return ((df::building_civzonest*)building)->type == civzone_type::Pond;
|
|
|
|
*/ return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Buildings::isActive(df::building * building)
|
|
|
|
bool Buildings::isActive(df::building * building)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
/* TODO: understand how this changes for v50
|
|
|
|
// 8 is the value obtained by reverse engineering
|
|
|
|
return ((df::building_civzonest*) building)->zone_flags.bits.active != 0;
|
|
|
|
return ((df::building_civzonest*)building)->is_active == 8;
|
|
|
|
*/ return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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.hospital != 0;
|
|
|
|
|
|
|
|
*/ return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Buildings::isAnimalTraining(df::building * building)
|
|
|
|
bool Buildings::isAnimalTraining(df::building * building)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
if (!isActivityZone(building))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
/* TODO: understand how this changes for v50
|
|
|
|
|
|
|
|
return ((df::building_civzonest*) building)->zone_flags.bits.animal_training != 0;
|
|
|
|
return ((df::building_civzonest*)building)->type == civzone_type::AnimalTraining;
|
|
|
|
*/ return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// returns building of pen/pit at cursor position (NULL if nothing found)
|
|
|
|
// returns building of pen/pit at cursor position (NULL if nothing found)
|
|
|
|