Skip to content

Commit

Permalink
Do not use translated strings in debug messages (CleverRaven#49972)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg authored Jul 16, 2021
1 parent 43d9266 commit 2888c4c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/activity_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ void lockpick_activity_actor::finish( player_activity &act, Character &who )
// In the meantime, let's roll 3d5-3, giving us a range of 0-12.
int lock_roll = rng( 0, 4 ) + rng( 0, 4 ) + rng( 0, 4 );

add_msg_debug( debugmode::DF_ACT_LOCKPICK, _( "Rolled %i. Mean_roll %g. Difficulty %i." ),
add_msg_debug( debugmode::DF_ACT_LOCKPICK, "Rolled %i. Mean_roll %g. Difficulty %i.",
pick_roll,
mean_roll, lock_roll );

Expand Down
8 changes: 4 additions & 4 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ static bool check_butcher_cbm( const int roll )
// 90% at roll 0, 72% at roll 1, 60% at roll 2, 51% @ 3, 45% @ 4, 40% @ 5, ... , 25% @ 10
// Roll is roughly a rng(0, -3 + 1st_aid + fine_cut_quality + 1/2 electronics + small_dex_bonus)
// Roll is reduced by corpse damage level, but to no less then 0
add_msg_debug( debugmode::DF_ACT_BUTCHER, _( "Roll = %i" ), roll );
add_msg_debug( debugmode::DF_ACT_BUTCHER, _( "Failure chance = %f%%" ),
add_msg_debug( debugmode::DF_ACT_BUTCHER, "Roll = %i", roll );
add_msg_debug( debugmode::DF_ACT_BUTCHER, "Failure chance = %f%%",
( 9.0f / ( 10.0f + roll * 2.5f ) ) * 100.0f );
const bool failed = x_in_y( 9, ( 10 + roll * 2.5 ) );
return !failed;
Expand Down Expand Up @@ -869,7 +869,7 @@ static void butchery_drops_harvest( item *corpse_item, const mtype &mt, player &
int roll = roll_butchery() - corpse_item->damage_level();
roll = roll < 0 ? 0 : roll;
roll = std::min( entry.max, roll );
add_msg_debug( debugmode::DF_ACT_BUTCHER, _( "Roll penalty for corpse damage = %s" ),
add_msg_debug( debugmode::DF_ACT_BUTCHER, "Roll penalty for corpse damage = %s",
0 - corpse_item->damage_level() );
if( entry.type == "bionic" ) {
butcher_cbm_item( drop_id, p.pos(), calendar::turn, roll, entry.flags, entry.faults );
Expand Down Expand Up @@ -1178,7 +1178,7 @@ void activity_handlers::butcher_finish( player_activity *act, player *p )
skill_level = p->get_skill_level( skill_firstaid );
skill_level += p->max_quality( qual_CUT_FINE );
skill_level += p->get_skill_level( skill_electronics ) / 2;
add_msg_debug( debugmode::DF_ACT_BUTCHER, _( "Skill: %s" ), skill_level );
add_msg_debug( debugmode::DF_ACT_BUTCHER, "Skill: %s", skill_level );
}

const auto roll_butchery = [&]() {
Expand Down
2 changes: 1 addition & 1 deletion src/avatar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ void avatar::do_read( item &book )
skill_id skill_used = style_to_learn->primary_skill;
int difficulty = std::max( 1, style_to_learn->learn_difficulty );
difficulty = std::max( 1, 20 + difficulty * 2 - get_skill_level( skill_used ) * 2 );
add_msg_debug( debugmode::DF_AVATAR, _( "Chance to learn one in: %d" ), difficulty );
add_msg_debug( debugmode::DF_AVATAR, "Chance to learn one in: %d", difficulty );

if( one_in( difficulty ) ) {
m->second.call( *this, book, false, pos() );
Expand Down
2 changes: 1 addition & 1 deletion src/effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ void effect::set_duration( const time_duration &dur, bool alert )
}

add_msg_debug( debugmode::DF_EFFECT, "ID: %s, Duration %s", get_id().c_str(),
to_string( duration ) );
to_string_writable( duration ) );
}
void effect::mod_duration( const time_duration &dur, bool alert )
{
Expand Down
2 changes: 1 addition & 1 deletion src/iexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3764,7 +3764,7 @@ void trap::examine( const tripoint &examp ) const

int roll = std::round( normal_roll( mean_roll, 3 ) );

add_msg_debug( debugmode::DF_IEXAMINE, _( "Rolled %i, mean_roll %g. difficulty %i." ), roll,
add_msg_debug( debugmode::DF_IEXAMINE, "Rolled %i, mean_roll %g. difficulty %i.", roll,
mean_roll, difficulty );

//Difficulty 0 traps should succeed regardless of proficiencies. (i.e caltrops and nailboards)
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle_move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void vehicle::smart_controller_handle_turn( bool thrusting,
smart_controller_state = cur_state;

if( player_in_control( player_character ) ) {
add_msg_debug( debugmode::DF_VEHICLE_MOVE, _( "Smart controller optimizes engine state." ) );
add_msg_debug( debugmode::DF_VEHICLE_MOVE, "Smart controller optimizes engine state." );
}
}
} else {
Expand Down

0 comments on commit 2888c4c

Please sign in to comment.