|
|
@ -1466,7 +1466,7 @@ static command_result GetBlockList(color_ostream &stream, const BlockRequest *in
|
|
|
|
df::map_block * block = DFHack::Maps::getBlock(pos);
|
|
|
|
df::map_block * block = DFHack::Maps::getBlock(pos);
|
|
|
|
if (block != NULL)
|
|
|
|
if (block != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int nonAir = 0;
|
|
|
|
bool nonAir = false;
|
|
|
|
for (int xxx = 0; xxx < 16; xxx++)
|
|
|
|
for (int xxx = 0; xxx < 16; xxx++)
|
|
|
|
for (int yyy = 0; yyy < 16; yyy++)
|
|
|
|
for (int yyy = 0; yyy < 16; yyy++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1474,16 +1474,23 @@ static command_result GetBlockList(color_ostream &stream, const BlockRequest *in
|
|
|
|
DFHack::tileShapeBasic(DFHack::tileShape(block->tiletype[xxx][yyy])) != df::tiletype_shape_basic::Open)
|
|
|
|
DFHack::tileShapeBasic(DFHack::tileShape(block->tiletype[xxx][yyy])) != df::tiletype_shape_basic::Open)
|
|
|
|
|| block->designation[xxx][yyy].bits.flow_size > 0
|
|
|
|
|| block->designation[xxx][yyy].bits.flow_size > 0
|
|
|
|
|| block->occupancy[xxx][yyy].bits.building > 0)
|
|
|
|
|| block->occupancy[xxx][yyy].bits.building > 0)
|
|
|
|
nonAir++;
|
|
|
|
{
|
|
|
|
|
|
|
|
nonAir = true;
|
|
|
|
|
|
|
|
goto ItsAir;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nonAir > 0 || firstBlock)
|
|
|
|
ItsAir:
|
|
|
|
|
|
|
|
if (block->flows.size() > 0)
|
|
|
|
|
|
|
|
nonAir = true;
|
|
|
|
|
|
|
|
if (nonAir || firstBlock)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool tileChanged = IsTiletypeChanged(pos);
|
|
|
|
bool tileChanged = IsTiletypeChanged(pos);
|
|
|
|
bool desChanged = IsDesignationChanged(pos);
|
|
|
|
bool desChanged = IsDesignationChanged(pos);
|
|
|
|
bool spatterChanged = IsspatterChanged(pos);
|
|
|
|
bool spatterChanged = IsspatterChanged(pos);
|
|
|
|
bool itemsChanged = block->items.size() > 0;
|
|
|
|
bool itemsChanged = block->items.size() > 0;
|
|
|
|
|
|
|
|
bool flows = block->flows.size() > 0;
|
|
|
|
RemoteFortressReader::MapBlock *net_block;
|
|
|
|
RemoteFortressReader::MapBlock *net_block;
|
|
|
|
if (tileChanged || desChanged || spatterChanged || firstBlock || itemsChanged)
|
|
|
|
if (tileChanged || desChanged || spatterChanged || firstBlock || itemsChanged || flows)
|
|
|
|
net_block = out->add_map_blocks();
|
|
|
|
net_block = out->add_map_blocks();
|
|
|
|
if (tileChanged)
|
|
|
|
if (tileChanged)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1502,6 +1509,10 @@ static command_result GetBlockList(color_ostream &stream, const BlockRequest *in
|
|
|
|
Copyspatters(block, net_block, &MC, pos);
|
|
|
|
Copyspatters(block, net_block, &MC, pos);
|
|
|
|
if (itemsChanged)
|
|
|
|
if (itemsChanged)
|
|
|
|
CopyItems(block, net_block, &MC, pos);
|
|
|
|
CopyItems(block, net_block, &MC, pos);
|
|
|
|
|
|
|
|
if (flows)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CopyFlows(block, net_block);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|