From 278b43359c506b6eea509a3e6e310d90f45a5447 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Mon, 25 Dec 2023 17:59:15 -0600 Subject: [PATCH] fix(UI): more improvements to visibility of bionic scanning (#3977) fix: more improvements to visibility of bionic scanning --- src/game.cpp | 5 ++++- src/item.cpp | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index eb88cbce46f5..0c9fa18bfe93 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -8146,7 +8146,10 @@ static void add_corpses( uilist &menu, const std::vector &its, int hotkey = get_initial_hotkey( menu_index ); for( const item * const &it : its ) { - menu.addentry( menu_index++, true, hotkey, it->get_mtype()->nname() ); + const std::string msg_name = it->has_flag( flag_CBM_SCANNED ) + ? string_format( _( "%s (bionic detected)" ), it->get_mtype()->nname() ) + : _( it->get_mtype()->nname() ); + menu.addentry( menu_index++, true, hotkey, msg_name ); hotkey = -1; } } diff --git a/src/item.cpp b/src/item.cpp index 3766a5d3c012..3e9c38ec105e 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -4628,8 +4628,12 @@ std::string item::tname( unsigned int quantity, bool with_prefix, unsigned int t tagtext += _( " (unread)" ); } } - if( has_var( "bionics_scanned_by" ) && has_flag( flag_CBM_SCANNED ) ) { - tagtext += _( " (bionic detected)" ); + if( has_var( "bionics_scanned_by" ) ) { + if( has_flag( flag_CBM_SCANNED ) ) { + tagtext += _( " (bionic detected)" ); + } else { + tagtext += _( " (scanned)" ); + } } if( has_flag( flag_ETHEREAL_ITEM ) ) { tagtext += string_format( _( " (%s turns)" ), get_var( "ethereal" ) );