From 27dc15f4cf85074247911b9ddc8fded5cb6c3d77 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 17 Jan 2021 05:24:50 -0800 Subject: Update ammo names patch Add 45-70 ammo can be dismantled patch Add NPCs stop using tables instead of cots patch --- 0015-stop-sleeping-on-tables.patch | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 0015-stop-sleeping-on-tables.patch (limited to '0015-stop-sleeping-on-tables.patch') 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 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 { -- cgit v1.2.1