diff --git a/src/iexamine.cpp b/src/iexamine.cpp index da22a49af18fe..e6e8d731d8664 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -106,6 +106,7 @@ static const efftype_id effect_mending( "mending" ); static const efftype_id effect_pkill2( "pkill2" ); static const efftype_id effect_teleglow( "teleglow" ); static const efftype_id effect_sleep( "sleep" ); +static const efftype_id effect_earphones( "earphones" ); static const trait_id trait_DEBUG_HS( "DEBUG_HS" ); static const trait_id trait_AMORPHOUS( "AMORPHOUS" ); @@ -1219,8 +1220,10 @@ void iexamine::safe( player &p, const tripoint &examp ) if( p.is_deaf() ) { add_msg( m_info, _( "You can't crack a safe while deaf!" ) ); return; - } - if( query_yn( _( "Attempt to crack the safe?" ) ) ) { + } else if( p.has_effect( effect_earphones ) ) { + add_msg( m_info, _( "You can't crack a safe with earbuds on!" ) ); + return; + } else if( query_yn( _( "Attempt to crack the safe?" ) ) ) { add_msg( m_info, _( "You start cracking the safe." ) ); // 150 minutes +/- 20 minutes per mechanics point away from 3 +/- 10 minutes per // perception point away from 8; capped at 30 minutes minimum. *100 to convert to moves diff --git a/src/iuse.cpp b/src/iuse.cpp index 56f32319a60ec..753c9725f33d5 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4106,8 +4106,10 @@ int iuse::mp3( player *p, item *it, bool, const tripoint & ) p->add_msg_if_player( m_info, _( "You put in the earbuds and start listening to music." ) ); if( it->typeId() == "mp3" ) { it->convert( "mp3_on" ).active = true; + p->mod_moves( -200 ); } else if( it->typeId() == "smart_phone" ) { it->convert( "smartphone_music" ).active = true; + p->mod_moves( -200 ); } } return it->type->charges_to_use(); @@ -4185,9 +4187,11 @@ int iuse::mp3_on( player *p, item *it, bool t, const tripoint &pos ) if( it->typeId() == "mp3_on" ) { p->add_msg_if_player( _( "The mp3 player turns off." ) ); it->convert( "mp3" ).active = false; + p->mod_moves( -200 ); } else if( it->typeId() == "smartphone_music" ) { p->add_msg_if_player( _( "The phone turns off." ) ); it->convert( "smart_phone" ).active = false; + p->mod_moves( -200 ); } } return it->type->charges_to_use();