Skip to content

Commit

Permalink
add messages for ir vision in look_around (#40464)
Browse files Browse the repository at this point in the history
also gives message for other special forms of seeing
  • Loading branch information
floyza authored May 12, 2020
1 parent 163a893 commit 417cc77
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5834,10 +5834,10 @@ void game::print_all_tile_info( const tripoint &lp, const catacurses::window &w_
if( inbounds ) {
visibility = m.get_visibility( m.apparent_light_at( lp, cache ), cache );
}
const Creature *creature = critter_at( lp, true );
switch( visibility ) {
case VIS_CLEAR: {
const optional_vpart_position vp = m.veh_at( lp );
const Creature *creature = critter_at( lp, true );
print_terrain_info( lp, w_look, area_name, column, line );
print_fields_info( lp, w_look, column, line );
print_trap_info( lp, w_look, column, line );
Expand All @@ -5863,6 +5863,34 @@ void game::print_all_tile_info( const tripoint &lp, const catacurses::window &w_
case VIS_HIDDEN:
print_visibility_info( w_look, column, line, visibility );

if( creature != nullptr ) {
if( u.sees_with_infrared( *creature ) ) {
std::string size_str;
switch( creature->get_size() ) {
case MS_TINY:
size_str = pgettext( "infrared size", "tiny" );
break;
case MS_SMALL:
size_str = pgettext( "infrared size", "small" );
break;
case MS_MEDIUM:
size_str = pgettext( "infrared size", "medium" );
break;
case MS_LARGE:
size_str = pgettext( "infrared size", "large" );
break;
case MS_HUGE:
size_str = pgettext( "infrared size", "huge" );
break;
}
mvwprintw( w_look, point( 1, ++line ), _( "You see a figure radiating heat." ) );
mvwprintw( w_look, point( 1, ++line ), _( "It is %s in size." ),
size_str );
} else if( u.sees_with_specials( *creature ) ) {
mvwprintw( w_look, point( 1, ++line ), _( "You sense a creature here." ) );
}
}

if( draw_terrain_indicators && !liveview.is_enabled() ) {
print_visibility_indicator( visibility );
}
Expand Down

0 comments on commit 417cc77

Please sign in to comment.