|
|
@ -1170,10 +1170,17 @@ void CopyBuildings(df::map_block * DfBlock, RemoteFortressReader::MapBlock * Net
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
auto out_bld = NetBlock->add_buildings();
|
|
|
|
auto out_bld = NetBlock->add_buildings();
|
|
|
|
CopyBuilding(i, out_bld);
|
|
|
|
CopyBuilding(i, out_bld);
|
|
|
|
df::building_actual* actualBuilding = strict_virtual_cast<df::building_actual>(bld);
|
|
|
|
df::building_actual* actualBuilding = virtual_cast<df::building_actual>(bld);
|
|
|
|
if (actualBuilding)
|
|
|
|
if (actualBuilding)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int i = 0; i < actualBuilding->contained_items.size(); i++)
|
|
|
|
for (int i = 0; i < actualBuilding->contained_items.size(); i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (actualBuilding->contained_items[i]->use_mode == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isItemChanged(actualBuilding->contained_items[i]->item->id))
|
|
|
|
|
|
|
|
CopyItem(NetBlock->add_items(), actualBuilding->contained_items[i]->item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto buildingItem = out_bld->add_items();
|
|
|
|
auto buildingItem = out_bld->add_items();
|
|
|
|
buildingItem->set_mode(actualBuilding->contained_items[i]->use_mode);
|
|
|
|
buildingItem->set_mode(actualBuilding->contained_items[i]->use_mode);
|
|
|
@ -1182,6 +1189,7 @@ void CopyBuildings(df::map_block * DfBlock, RemoteFortressReader::MapBlock * Net
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Copyspatters(df::map_block * DfBlock, RemoteFortressReader::MapBlock * NetBlock, MapExtras::MapCache * MC, DFCoord pos)
|
|
|
|
void Copyspatters(df::map_block * DfBlock, RemoteFortressReader::MapBlock * NetBlock, MapExtras::MapCache * MC, DFCoord pos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|