probe: print more designation and occupancy-related flags

This was useful for testing #1729
develop
lethosor 2020-12-23 15:36:14 -05:00
parent 4c0f9f032d
commit 8cace1eb06
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
2 changed files with 21 additions and 6 deletions

@ -53,6 +53,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `buildingplan`: min quality adjustment hotkeys changed from 'qw' to 'QW' to avoid conflict with existing hotkeys for setting roller speed. max quality adjustment hotkeys changed from 'QW' to 'AS' to make room for the min quality hotkey changes. - `buildingplan`: min quality adjustment hotkeys changed from 'qw' to 'QW' to avoid conflict with existing hotkeys for setting roller speed. max quality adjustment hotkeys changed from 'QW' to 'AS' to make room for the min quality hotkey changes.
- `buildingplan`: new global settings page accessible via ``G`` hotkey when on any building build screen; ``Quickfort Mode`` toggle for legacy Python Quickfort has been moved to this page - `buildingplan`: new global settings page accessible via ``G`` hotkey when on any building build screen; ``Quickfort Mode`` toggle for legacy Python Quickfort has been moved to this page
- `buildingplan`: new global settings for whether generic building materials should match blocks, boulders, logs, and/or bars. defaults are everything but bars. - `buildingplan`: new global settings for whether generic building materials should match blocks, boulders, logs, and/or bars. defaults are everything but bars.
- `probe`: added more output for designations and tile occupancy
- `quickfort`: The Dreamfort sample blueprints now have complete walkthroughs for each fort level and importable orders that automate basic fort stock management - `quickfort`: The Dreamfort sample blueprints now have complete walkthroughs for each fort level and importable orders that automate basic fort stock management
- `quickfort`: More blueprints have been added to the blueprints library: several bedroom layouts, the Saracen Crypts, and the complete fortress example from Python Quickfort: TheQuickFortress - `quickfort`: More blueprints have been added to the blueprints library: several bedroom layouts, the Saracen Crypts, and the complete fortress example from Python Quickfort: TheQuickFortress
- `embark-assistant`: split the lair types displayed on the local map into mound, burrow, and lair - `embark-assistant`: split the lair types displayed on the local map into mound, burrow, and lair

@ -309,10 +309,17 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
if(des.bits.water_stagnant) if(des.bits.water_stagnant)
out << "stagnant" << endl; 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", "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' : ' ' ) ) #define PRINT_FLAG( FIELD, BIT ) out.print("%-16s= %c\n", #BIT , ( FIELD.bits.BIT ? 'Y' : ' ' ) )
out.print("%-16s= %s\n", "dig", enum_item_key(des.bits.dig).c_str());
PRINT_FLAG(occ, dig_marked);
PRINT_FLAG(occ, dig_auto);
out.print("%-16s= %s\n", "traffic", enum_item_key(des.bits.traffic).c_str());
PRINT_FLAG(occ, carve_track_north);
PRINT_FLAG(occ, carve_track_south);
PRINT_FLAG(occ, carve_track_east);
PRINT_FLAG(occ, carve_track_west);
PRINT_FLAG( des, hidden ); PRINT_FLAG( des, hidden );
PRINT_FLAG( des, light ); PRINT_FLAG( des, light );
PRINT_FLAG( des, outside ); PRINT_FLAG( des, outside );
@ -344,12 +351,19 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
out.print(" (%2d)", global.type); out.print(" (%2d)", global.type);
out.print(" %s\n", sa_feature(global.type)); out.print(" %s\n", sa_feature(global.type));
} }
#undef PRINT_FLAG
out << "local feature idx: " << block.local_feature out << "local feature idx: " << block.local_feature
<< endl; << endl;
out << "global feature idx: " << block.global_feature out << "global feature idx: " << block.global_feature
<< endl; << endl;
out << std::endl; out << endl;
out << "Occupancy:" << endl;
out.print("%-16s= %s\n", "building", enum_item_key(occ.bits.building).c_str());
PRINT_FLAG(occ, unit);
PRINT_FLAG(occ, unit_grounded);
PRINT_FLAG(occ, item);
PRINT_FLAG(occ, moss);
out << endl;
if(block.occupancy[tileX][tileY].bits.no_grow) if(block.occupancy[tileX][tileY].bits.no_grow)
out << "no grow" << endl; out << "no grow" << endl;
@ -382,7 +396,7 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
} }
} }
#undef PRINT_FLAG
return CR_OK; return CR_OK;
} }