Skip to content

Commit

Permalink
feat(balance): MILITARY_MECH flag affects ID card needed, fix duplica…
Browse files Browse the repository at this point in the history
…te message (#3697)

* feat(balance): MILITARY_MECH flag affects ID card needed, fix duplicate message

* Fix the thing
  • Loading branch information
chaosvolt authored Nov 17, 2023
1 parent 2a82a3e commit f73f0d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion data/json/monsters/mechsuits.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
"flags": [
"SEES",
"HEARS",
"MILITARY_MECH",
"BASHES",
"PUSH_VEH",
"PUSH_MON",
Expand Down
1 change: 0 additions & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,6 @@ void Character::mount_creature( monster &z )
}
add_msg_if_player( m_good, _( "You hear your %s whir to life." ), z.get_name() );
}
add_msg_if_player( m_good, _( "You hear your %s whir to life." ), z.get_name() );
}
// some rideable mechs have night-vision
recalc_sight_limits();
Expand Down
8 changes: 5 additions & 3 deletions src/monexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static const efftype_id effect_led_by_leash( "led_by_leash" );
static const efftype_id effect_tied( "tied" );

static const itype_id itype_cash_card( "cash_card" );
static const itype_id itype_id_industrial( "id_industrial" );
static const itype_id itype_id_military( "id_military" );

static const skill_id skill_survival( "survival" );
Expand Down Expand Up @@ -430,10 +431,10 @@ void monexamine::insert_battery( monster &z )

bool monexamine::mech_hack( monster &z )
{
itype_id card_type = itype_id_military;
itype_id card_type = ( z.has_flag( MF_MILITARY_MECH ) ? itype_id_military : itype_id_industrial );
avatar &you = get_avatar();
if( you.has_amount( card_type, 1 ) ) {
if( query_yn( _( "Swipe your ID card into the mech's security port?" ) ) ) {
if( query_yn( _( "Swipe your %s into the mech's security port?" ), item::nname( card_type ) ) ) {
you.mod_moves( -100 );
z.add_effect( effect_pet, 1_turns, num_bp );
z.friendly = -1;
Expand All @@ -443,7 +444,8 @@ bool monexamine::mech_hack( monster &z )
return true;
}
} else {
add_msg( m_info, _( "You do not have the required ID card to activate this mech." ) );
add_msg( m_info, _( "You do not have the required %s to activate this mech." ),
item::nname( card_type ) );
}
return false;
}
Expand Down

0 comments on commit f73f0d1

Please sign in to comment.