Merge branch 'develop' of https://github.com/dfhack/dfhack into develop

develop
lethosor 2016-06-07 08:20:12 -04:00
commit bcefb0205a
2 changed files with 39 additions and 26 deletions

@ -198,6 +198,7 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
df::tiletype tiletype = mc.tiletypeAt(cursor);
df::tile_designation &des = block.designation[tileX][tileY];
df::tile_occupancy &occ = block.occupancy[tileX][tileY];
uint8_t fog_of_war = block.fog_of_war[tileX][tileY];
/*
if(showDesig)
{
@ -303,7 +304,8 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
if(des.bits.water_stagnant)
out << "stagnant" << endl;
out.print("%-16s= %s\n", "dig", ENUM_KEY_STR(tile_dig_designation,des.bits.dig).c_str());
out.print("%-16s= %s\n", "dig", ENUM_KEY_STR(tile_dig_designation, des.bits.dig).c_str());
out.print("%-16s= %s\n", "traffic", ENUM_KEY_STR(tile_traffic, des.bits.traffic).c_str());
#define PRINT_FLAG( FIELD, BIT ) out.print("%-16s= %c\n", #BIT , ( FIELD.bits.BIT ? 'Y' : ' ' ) )
PRINT_FLAG( des, hidden );
@ -313,6 +315,7 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
PRINT_FLAG( des, water_table );
PRINT_FLAG( des, rained );
PRINT_FLAG( occ, monster_lair);
out.print("%-16s= %d\n", "fog_of_war", fog_of_war);
df::coord2d pc(blockX, blockY);

@ -101,6 +101,7 @@ using namespace df::global;
REQUIRE_GLOBAL(world);
REQUIRE_GLOBAL(gps);
REQUIRE_GLOBAL(ui);
REQUIRE_GLOBAL(gamemode);
#endif
// Here go all the command declarations...
@ -1165,12 +1166,20 @@ void CopyDesignation(df::map_block * DfBlock, RemoteFortressReader::MapBlock * N
NetBlock->add_magma(lava);
NetBlock->add_water(water);
NetBlock->add_aquifer(designation.bits.water_table);
NetBlock->add_hidden(designation.bits.hidden);
NetBlock->add_light(designation.bits.light);
NetBlock->add_outside(designation.bits.outside);
NetBlock->add_subterranean(designation.bits.subterranean);
NetBlock->add_water_salt(designation.bits.water_salt);
NetBlock->add_water_stagnant(designation.bits.water_stagnant);
if (gamemode && (*gamemode == game_mode::ADVENTURE))
{
auto fog_of_war = DfBlock->fog_of_war[xx][yy];
NetBlock->add_hidden(designation.bits.dig == TileDigDesignation::NO_DIG || designation.bits.hidden);
NetBlock->add_tile_dig_designation(TileDigDesignation::NO_DIG);
}
else
{
NetBlock->add_hidden(designation.bits.hidden);
switch (designation.bits.dig)
{
case df::enums::tile_dig_designation::No:
@ -1199,6 +1208,7 @@ void CopyDesignation(df::map_block * DfBlock, RemoteFortressReader::MapBlock * N
break;
}
}
}
}
void CopyBuildings(df::map_block * DfBlock, RemoteFortressReader::MapBlock * NetBlock, MapExtras::MapCache * MC, DFCoord pos)