diff options
Diffstat (limited to '0015-stop-sleeping-on-tables.patch')
-rw-r--r-- | 0015-stop-sleeping-on-tables.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/0015-stop-sleeping-on-tables.patch b/0015-stop-sleeping-on-tables.patch new file mode 100644 index 0000000..b114fdd --- /dev/null +++ b/0015-stop-sleeping-on-tables.patch @@ -0,0 +1,35 @@ +--- a/src/character.cpp ++++ b/src/character.cpp +@@ -8725,12 +8725,29 @@ + const optional_vpart_position vp = g->m.veh_at( pos ); + const cata::optional<vpart_reference> boardable = vp.part_with_feature( "BOARDABLE", true ); + // Search the floor for bedding ++ // Note by jc: ++ // Items without floor_bedding_warmth set appear to assume 0 ++ // Added clause to assume 0 == unset and thus -2000 ++ // And same thing for random vehicles. ++ // No more sleeping on tables, bumpers, and funnels. + if( furn_at_pos != f_null ) { +- floor_bedding_warmth += furn_at_pos.obj().floor_bedding_warmth; ++ if( furn_at_pos.obj().floor_bedding_warmth != 0 ) { ++ floor_bedding_warmth += furn_at_pos.obj().floor_bedding_warmth; ++ } else { ++ floor_bedding_warmth -= 2000; ++ } + } else if( !trap_at_pos.is_null() ) { +- floor_bedding_warmth += trap_at_pos.floor_bedding_warmth; ++ if( trap_at_pos.floor_bedding_warmth != 0 ) { ++ floor_bedding_warmth += trap_at_pos.floor_bedding_warmth; ++ } else { ++ floor_bedding_warmth -= 2000; ++ } + } else if( boardable ) { +- floor_bedding_warmth += boardable->info().floor_bedding_warmth; ++ if( boardable->info().floor_bedding_warmth != 0 ) { ++ floor_bedding_warmth += boardable->info().floor_bedding_warmth; ++ } else { ++ floor_bedding_warmth -= 2000; ++ } + } else if( ter_at_pos == t_improvised_shelter ) { + floor_bedding_warmth -= 500; + } else { |