Skip to content

Commit

Permalink
Change messages when trying to sleep in vehicle (#34233)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg authored and kevingranade committed Sep 26, 2019
1 parent 91a9934 commit 34620d6
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9424,11 +9424,26 @@ void player::try_to_sleep( const time_duration &dur )
vp.part_with_feature( "SEAT", true ) ||
vp.part_with_feature( "BED", true ) ) ) {
add_msg_if_player( m_good, _( "This is a comfortable place to sleep." ) );
} else if( ter_at_pos != t_floor && !plantsleep && !fungaloid_cosplay && !watersleep ) {
add_msg_if_player( ter_at_pos.obj().movecost <= 2 ?
_( "It's a little hard to get to sleep on this %s." ) :
_( "It's hard to get to sleep on this %s." ),
ter_at_pos.obj().name() );
} else if( !plantsleep && !fungaloid_cosplay && !watersleep ) {
if( !vp && ter_at_pos != t_floor ) {
add_msg_if_player( ter_at_pos.obj().movecost <= 2 ?
_( "It's a little hard to get to sleep on this %s." ) :
_( "It's hard to get to sleep on this %s." ),
ter_at_pos.obj().name() );
} else if( vp ) {
if( vp->part_with_feature( VPFLAG_AISLE, true ) ) {
add_msg_if_player(
//~ %1$s: vehicle name, %2$s: vehicle part name
_( "It's a little hard to get to sleep on this %2$s in %1$s." ),
vp->vehicle().disp_name(),
vp->part_with_feature( VPFLAG_AISLE, true )->part().name( false ) );
} else {
add_msg_if_player(
//~ %1$s: vehicle name
_( "It's hard to get to sleep in %1$s." ),
vp->vehicle().disp_name() );
}
}
}
add_msg_if_player( _( "You start trying to fall asleep." ) );
if( has_active_bionic( bio_soporific ) ) {
Expand Down

0 comments on commit 34620d6

Please sign in to comment.