Skip to content

Commit

Permalink
Make ability to remove vehicle parts more obvious (#40087)
Browse files Browse the repository at this point in the history
  • Loading branch information
procrustesmethod authored May 5, 2020
1 parent 5307883 commit 7161a41
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/veh_interact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1759,20 +1759,23 @@ bool veh_interact::can_remove_part( int idx, const player &p )
if( !( use_aid || use_str ) ) {
ok = false;
}
nc_color aid_color = use_aid ? c_green : ( use_str ? c_dark_gray : c_red );
nc_color str_color = use_str ? c_green : ( use_aid ? c_dark_gray : c_red );
const auto helpers = g->u.get_crafting_helpers();
//~ %1$s is quality name, %2$d is quality level
std::string aid_string = string_format( _( "1 tool with %1$s %2$d" ),
qual.obj().name, lvl );

std::string str_string;
if( !helpers.empty() ) {
msg += string_format(
//~ %1$s represents the internal color name which shouldn't be translated, %2$s is the tool quality, %3$i is tool level, %4$s is the internal color name which shouldn't be translated and %5$i is the character's strength
_( "> %1$s1 tool with %2$s %3$i</color> <color_white>OR</color> %4$sstrength ( assisted ) %5$i</color>" ),
status_color( use_aid ), qual.obj().name, lvl,
status_color( use_str ), str ) + "\n";
str_string = string_format( _( "strength ( assisted ) %d" ), str );
} else {
msg += string_format(
//~ %1$s represents the internal color name which shouldn't be translated, %2$s is the tool quality, %3$i is tool level, %4$s is the internal color name which shouldn't be translated and %5$i is the character's strength
_( "> %1$s1 tool with %2$s %3$i</color> <color_white>OR</color> %4$sstrength %5$i</color>" ),
status_color( use_aid ), qual.obj().name, lvl,
status_color( use_str ), str ) + "\n";
str_string = string_format( _( "strength %d" ), str );
}

msg += string_format( _( "> %1$s <color_white>OR</color> %2$s" ),
colorize( aid_string, aid_color ),
colorize( str_string, str_color ) ) + "\n";
std::string reason;
if( !veh->can_unmount( idx, reason ) ) {
//~ %1$s represents the internal color name which shouldn't be translated, %2$s is pre-translated reason
Expand Down

0 comments on commit 7161a41

Please sign in to comment.