Skip to content

Commit

Permalink
Merge pull request CleverRaven#36473 from Ramza13/uncomfortable_sleep
Browse files Browse the repository at this point in the history
Fix impossible to sleep on hard ground
  • Loading branch information
Rivet-the-Zombie authored Dec 27, 2019
2 parents ba506fb + c05670a commit 08c8b1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>( comfort_level::uncomfortable );
comfort = static_cast<int>( 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 ||
Expand All @@ -5793,7 +5793,7 @@ comfort_level player::base_comfort_value( const tripoint &p ) const
}
// Sleep ain't happening
else {
comfort = static_cast<int>( comfort_level::uncomfortable );
comfort = static_cast<int>( comfort_level::impossible );
}
}
// Has webforce
Expand All @@ -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<int>( comfort_level::very_comfortable );
} else {
comfort = static_cast<int>( comfort_level::uncomfortable );
comfort = static_cast<int>( comfort_level::impossible );
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 08c8b1f

Please sign in to comment.