From c05670a77c450c5fe619db1c335e1e0157aa12fe Mon Sep 17 00:00:00 2001 From: Ramza13 <52087122+Ramza13@users.noreply.github.com> Date: Thu, 26 Dec 2019 14:38:02 -0500 Subject: [PATCH] Allow sleeping on uncomfortable spaces --- src/player.cpp | 6 +++--- src/player.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/player.cpp b/src/player.cpp index f4aae4b9a3969..dfa0f4897b9c1 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -5780,7 +5780,7 @@ comfort_level player::base_comfort_value( const tripoint &p ) const } else if( plantsleep ) { if( vp || furn_at_pos != f_null ) { // Sleep ain't happening in a vehicle or on furniture - comfort = static_cast( comfort_level::uncomfortable ); + comfort = static_cast( comfort_level::impossible ); } else { // It's very easy for Chloromorphs to get to sleep on soil! if( ter_at_pos == t_dirt || ter_at_pos == t_pit || ter_at_pos == t_dirtmound || @@ -5793,7 +5793,7 @@ comfort_level player::base_comfort_value( const tripoint &p ) const } // Sleep ain't happening else { - comfort = static_cast( comfort_level::uncomfortable ); + comfort = static_cast( comfort_level::impossible ); } } // Has webforce @@ -5802,7 +5802,7 @@ comfort_level player::base_comfort_value( const tripoint &p ) const // Thick Web and you're good to go comfort += static_cast( comfort_level::very_comfortable ); } else { - comfort = static_cast( comfort_level::uncomfortable ); + comfort = static_cast( comfort_level::impossible ); } } diff --git a/src/player.h b/src/player.h index 47eefb8e821fa..81f548d5dbdb8 100644 --- a/src/player.h +++ b/src/player.h @@ -122,7 +122,8 @@ enum class rechargeable_cbm { }; enum class comfort_level { - uncomfortable = -999, + impossible = -999, + uncomfortable = -7, neutral = 0, slightly_comfortable = 3, comfortable = 5,