|
|
@ -1115,31 +1115,17 @@ static void createDesign(df::building *bld, bool rough)
|
|
|
|
|
|
|
|
|
|
|
|
static int getMaxStockpileId()
|
|
|
|
static int getMaxStockpileId()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto &vec = world->buildings.other[buildings_other_id::STOCKPILE];
|
|
|
|
|
|
|
|
int max_id = 0;
|
|
|
|
int max_id = 0;
|
|
|
|
|
|
|
|
for (auto bld : world->buildings.other.STOCKPILE)
|
|
|
|
for (size_t i = 0; i < vec.size(); i++)
|
|
|
|
max_id = std::max(max_id, bld->stockpile_number);
|
|
|
|
{
|
|
|
|
|
|
|
|
auto bld = strict_virtual_cast<df::building_stockpilest>(vec[i]);
|
|
|
|
|
|
|
|
if (bld)
|
|
|
|
|
|
|
|
max_id = std::max(max_id, bld->stockpile_number);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return max_id;
|
|
|
|
return max_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int getMaxCivzoneId()
|
|
|
|
static int getMaxCivzoneId()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto &vec = world->buildings.other[buildings_other_id::ANY_ZONE];
|
|
|
|
|
|
|
|
int max_id = 0;
|
|
|
|
int max_id = 0;
|
|
|
|
|
|
|
|
for (auto bld : world->buildings.other.ANY_ZONE)
|
|
|
|
for (size_t i = 0; i < vec.size(); i++)
|
|
|
|
max_id = std::max(max_id, bld->zone_num);
|
|
|
|
{
|
|
|
|
|
|
|
|
auto bld = strict_virtual_cast<df::building_civzonest>(vec[i]);
|
|
|
|
|
|
|
|
if (bld)
|
|
|
|
|
|
|
|
max_id = std::max(max_id, bld->zone_num);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return max_id;
|
|
|
|
return max_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|