Skip to content

Commit

Permalink
Add mongroup debug info to overmap editor
Browse files Browse the repository at this point in the history
To help debug mongroup issues, add debug output on the overmap editor
with various info about each mongroup on the OMT.
  • Loading branch information
jbytheway committed Jul 23, 2022
1 parent 386cb6d commit b68dbc0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/overmap_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,8 @@ static void draw_om_sidebar(
}

if( ( data.debug_editor && center_seen ) || data.debug_info ) {
mvwprintz( wbar, point( 1, ++lines ), c_white,
"abs_omt: %s", center.to_string() );
const oter_t &oter = overmap_buffer.ter( center ).obj();
mvwprintz( wbar, point( 1, ++lines ), c_white, "oter: %s (rot %d)", oter.id.str(),
oter.get_rotation() );
Expand Down Expand Up @@ -1118,6 +1120,15 @@ static void draw_om_sidebar(
io::enum_to_string( dir ), *join );
}
}

for( const mongroup *mg : overmap_buffer.monsters_at( center ) ) {
mvwprintz( wbar, point( 1, ++lines ), c_red, "mongroup %s (%zu/%u), %s %s%s%s",
mg->type.str(), mg->monsters.size(), mg->population,
mg->horde_behaviour,
mg->dying ? "x" : "", mg->horde ? "h" : "", mg->diffuse ? "d" : "" );
mvwprintz( wbar, point( 1, ++lines ), c_red, "target: %s (%d)",
project_to<coords::omt>( mg->target ).to_string(), mg->interest );
}
}

if( has_target ) {
Expand Down

0 comments on commit b68dbc0

Please sign in to comment.