From 42209cb39a6d278e0c3ad9dafd13bba47d3f9adb Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Mon, 18 Jan 2021 05:01:02 -0800 Subject: Revert the npc sleep on tables patch Add patch to prevent non-faction NPCs becoming sleep deprived --- ...e-firestation-shelter-wells-npc-drinkable.patch | 51 ------------- 0.F-backport-tacoma-barn-door-position.patch | 11 --- ...t-vehicle-heater-cooler-intensity-reduced.patch | 20 ----- ...e-firestation-shelter-wells-npc-drinkable.patch | 51 +++++++++++++ 0.F_backport-tacoma-barn-door-position.patch | 11 +++ ...t-vehicle-heater-cooler-intensity-reduced.patch | 20 +++++ 0005-allow-bio-firestarter-on-smoker.patch | 39 ---------- 0005-lumbermill-gasoline-not-spilled.patch | 11 +++ 0006-community-garden-fertilizer-not-spilled.patch | 17 +++++ 0006-npcs-eat-when-hungry.patch | 30 -------- 0007-lumbermill-gasoline-not-spilled.patch | 11 --- 0007-oxyacetylene-from-oxygen.patch | 12 +++ 0008-community-garden-fertilizer-not-spilled.patch | 17 ----- 0008-npc-can-use-soporific.patch | 10 +++ 0009-npc-can-use-gas-fuel.patch | 11 +++ 0009-oxyacetylene-from-oxygen.patch | 12 --- 0010-22-casings-can-stack.patch | 17 +++++ 0010-ammo-loudness-ap-times-2.patch | 11 --- 0011-4570-ammo-can-be-dismantled.patch | 34 +++++++++ 0011-npc-can-use-soporific.patch | 10 --- 0012-npc-can-use-gas-fuel.patch | 11 --- 0013-22-casings-can-stack.patch | 17 ----- 0014-4570-ammo-can-be-dismantled.patch | 34 --------- 0015-stop-sleeping-on-tables.patch | 35 --------- PKGBUILD | 88 ++++++++++++---------- jc_allow-bio-firestarter-on-smoker.patch | 39 ++++++++++ jc_ammo-loudness-ap-times-2.patch | 11 +++ jc_npcs-eat-when-hungry.patch | 30 ++++++++ jc_stop-non-faction-npc-sleep-depirvation.patch | 10 +++ 29 files changed, 331 insertions(+), 350 deletions(-) delete mode 100644 0.F-backport-make-firestation-shelter-wells-npc-drinkable.patch delete mode 100644 0.F-backport-tacoma-barn-door-position.patch delete mode 100644 0.F-backport-vehicle-heater-cooler-intensity-reduced.patch create mode 100644 0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch create mode 100644 0.F_backport-tacoma-barn-door-position.patch create mode 100644 0.F_backport-vehicle-heater-cooler-intensity-reduced.patch delete mode 100644 0005-allow-bio-firestarter-on-smoker.patch create mode 100644 0005-lumbermill-gasoline-not-spilled.patch create mode 100644 0006-community-garden-fertilizer-not-spilled.patch delete mode 100644 0006-npcs-eat-when-hungry.patch delete mode 100644 0007-lumbermill-gasoline-not-spilled.patch create mode 100644 0007-oxyacetylene-from-oxygen.patch delete mode 100644 0008-community-garden-fertilizer-not-spilled.patch create mode 100644 0008-npc-can-use-soporific.patch create mode 100644 0009-npc-can-use-gas-fuel.patch delete mode 100644 0009-oxyacetylene-from-oxygen.patch create mode 100644 0010-22-casings-can-stack.patch delete mode 100644 0010-ammo-loudness-ap-times-2.patch create mode 100644 0011-4570-ammo-can-be-dismantled.patch delete mode 100644 0011-npc-can-use-soporific.patch delete mode 100644 0012-npc-can-use-gas-fuel.patch delete mode 100644 0013-22-casings-can-stack.patch delete mode 100644 0014-4570-ammo-can-be-dismantled.patch delete mode 100644 0015-stop-sleeping-on-tables.patch create mode 100644 jc_allow-bio-firestarter-on-smoker.patch create mode 100644 jc_ammo-loudness-ap-times-2.patch create mode 100644 jc_npcs-eat-when-hungry.patch create mode 100644 jc_stop-non-faction-npc-sleep-depirvation.patch diff --git a/0.F-backport-make-firestation-shelter-wells-npc-drinkable.patch b/0.F-backport-make-firestation-shelter-wells-npc-drinkable.patch deleted file mode 100644 index 8eac7f0..0000000 --- a/0.F-backport-make-firestation-shelter-wells-npc-drinkable.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/data/json/recipes/basecamps/recipe_modular_firestation1.json -+++ b/data/json/recipes/basecamps/recipe_modular_firestation1.json -@@ -50,7 +50,13 @@ - "construction_blueprint": "fbmc_firestation1_well", - "blueprint_name": "build a well", - "blueprint_requires": [ { "id": "fbmc_firestation1_0" } ], -- "blueprint_provides": [ { "id": "fbmc_firestation1_well" }, { "id": "relaying" }, { "id": "scouting" }, { "id": "patrolling" } ], -+ "blueprint_provides": [ -+ { "id": "fbmc_firestation1_well" }, -+ { "id": "water_well" }, -+ { "id": "relaying" }, -+ { "id": "scouting" }, -+ { "id": "patrolling" } -+ ], - "blueprint_excludes": [ { "id": "fbmc_firestation1_well" } ], - "blueprint_needs": { - "time": "11 h", ---- a/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json -+++ b/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json -@@ -136,7 +136,13 @@ - "construction_blueprint": "fbmc_shelter_1_well", - "blueprint_name": "build a well", - "blueprint_requires": [ { "id": "fbmc_shelter_1_fire" } ], -- "blueprint_provides": [ { "id": "fbmc_shelter_1_well" }, { "id": "relaying" }, { "id": "scouting" }, { "id": "patrolling" } ], -+ "blueprint_provides": [ -+ { "id": "fbmc_shelter_1_well" }, -+ { "id": "water_well" }, -+ { "id": "relaying" }, -+ { "id": "scouting" }, -+ { "id": "patrolling" } -+ ], - "blueprint_excludes": [ { "id": "fbmc_shelter_1_well" } ], - "blueprint_needs": { - "time": "11 h", ---- a/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json -+++ b/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json -@@ -136,7 +136,13 @@ - "construction_blueprint": "fbmc_shelter_well", - "blueprint_name": "build a well", - "blueprint_requires": [ { "id": "fbmc_shelter_fire" } ], -- "blueprint_provides": [ { "id": "fbmc_shelter_well" }, { "id": "relaying" }, { "id": "scouting" }, { "id": "patrolling" } ], -+ "blueprint_provides": [ -+ { "id": "fbmc_shelter_well" }, -+ { "id": "water_well" }, -+ { "id": "relaying" }, -+ { "id": "scouting" }, -+ { "id": "patrolling" } -+ ], - "blueprint_excludes": [ { "id": "fbmc_shelter_well" } ], - "blueprint_needs": { - "time": "11 h", diff --git a/0.F-backport-tacoma-barn-door-position.patch b/0.F-backport-tacoma-barn-door-position.patch deleted file mode 100644 index d5f5642..0000000 --- a/0.F-backport-tacoma-barn-door-position.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/data/json/npcs/tacoma_ranch/NPC_ranch_foreman.json -+++ b/data/json/npcs/tacoma_ranch/NPC_ranch_foreman.json -@@ -122,7 +122,7 @@ - "place_nested": [ { "chunks": [ "tacoma_commune_west_wall_door" ], "x": 22, "y": 0 } ] - }, - { -- "om_terrain": "ranch_camp_66", -+ "om_terrain": "ranch_camp_75", - "translate_ter": [ { "from": "t_underbrush", "to": "t_dirt", "x": 0, "y": 0 } ], - "place_nested": [ - { "chunks": [ "tacoma_commune_east_wall_door" ], "x": 0, "y": 0 }, diff --git a/0.F-backport-vehicle-heater-cooler-intensity-reduced.patch b/0.F-backport-vehicle-heater-cooler-intensity-reduced.patch deleted file mode 100644 index c3d16d5..0000000 --- a/0.F-backport-vehicle-heater-cooler-intensity-reduced.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/data/json/emit.json -+++ b/data/json/emit.json -@@ -185,7 +185,7 @@ - { - "id": "emit_heater_vehicle", - "type": "emit", -- "field": "fd_hot_air3", -+ "field": "fd_hot_air2", - "intensity": 3, - "qty": 3, - "chance": 100 -@@ -193,7 +193,7 @@ - { - "id": "emit_cooler_vehicle", - "type": "emit", -- "field": "fd_cold_air3", -+ "field": "fd_cold_air2", - "intensity": 3, - "qty": 3, - "chance": 100 diff --git a/0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch b/0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch new file mode 100644 index 0000000..8eac7f0 --- /dev/null +++ b/0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch @@ -0,0 +1,51 @@ +--- a/data/json/recipes/basecamps/recipe_modular_firestation1.json ++++ b/data/json/recipes/basecamps/recipe_modular_firestation1.json +@@ -50,7 +50,13 @@ + "construction_blueprint": "fbmc_firestation1_well", + "blueprint_name": "build a well", + "blueprint_requires": [ { "id": "fbmc_firestation1_0" } ], +- "blueprint_provides": [ { "id": "fbmc_firestation1_well" }, { "id": "relaying" }, { "id": "scouting" }, { "id": "patrolling" } ], ++ "blueprint_provides": [ ++ { "id": "fbmc_firestation1_well" }, ++ { "id": "water_well" }, ++ { "id": "relaying" }, ++ { "id": "scouting" }, ++ { "id": "patrolling" } ++ ], + "blueprint_excludes": [ { "id": "fbmc_firestation1_well" } ], + "blueprint_needs": { + "time": "11 h", +--- a/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json ++++ b/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json +@@ -136,7 +136,13 @@ + "construction_blueprint": "fbmc_shelter_1_well", + "blueprint_name": "build a well", + "blueprint_requires": [ { "id": "fbmc_shelter_1_fire" } ], +- "blueprint_provides": [ { "id": "fbmc_shelter_1_well" }, { "id": "relaying" }, { "id": "scouting" }, { "id": "patrolling" } ], ++ "blueprint_provides": [ ++ { "id": "fbmc_shelter_1_well" }, ++ { "id": "water_well" }, ++ { "id": "relaying" }, ++ { "id": "scouting" }, ++ { "id": "patrolling" } ++ ], + "blueprint_excludes": [ { "id": "fbmc_shelter_1_well" } ], + "blueprint_needs": { + "time": "11 h", +--- a/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json ++++ b/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json +@@ -136,7 +136,13 @@ + "construction_blueprint": "fbmc_shelter_well", + "blueprint_name": "build a well", + "blueprint_requires": [ { "id": "fbmc_shelter_fire" } ], +- "blueprint_provides": [ { "id": "fbmc_shelter_well" }, { "id": "relaying" }, { "id": "scouting" }, { "id": "patrolling" } ], ++ "blueprint_provides": [ ++ { "id": "fbmc_shelter_well" }, ++ { "id": "water_well" }, ++ { "id": "relaying" }, ++ { "id": "scouting" }, ++ { "id": "patrolling" } ++ ], + "blueprint_excludes": [ { "id": "fbmc_shelter_well" } ], + "blueprint_needs": { + "time": "11 h", diff --git a/0.F_backport-tacoma-barn-door-position.patch b/0.F_backport-tacoma-barn-door-position.patch new file mode 100644 index 0000000..d5f5642 --- /dev/null +++ b/0.F_backport-tacoma-barn-door-position.patch @@ -0,0 +1,11 @@ +--- a/data/json/npcs/tacoma_ranch/NPC_ranch_foreman.json ++++ b/data/json/npcs/tacoma_ranch/NPC_ranch_foreman.json +@@ -122,7 +122,7 @@ + "place_nested": [ { "chunks": [ "tacoma_commune_west_wall_door" ], "x": 22, "y": 0 } ] + }, + { +- "om_terrain": "ranch_camp_66", ++ "om_terrain": "ranch_camp_75", + "translate_ter": [ { "from": "t_underbrush", "to": "t_dirt", "x": 0, "y": 0 } ], + "place_nested": [ + { "chunks": [ "tacoma_commune_east_wall_door" ], "x": 0, "y": 0 }, diff --git a/0.F_backport-vehicle-heater-cooler-intensity-reduced.patch b/0.F_backport-vehicle-heater-cooler-intensity-reduced.patch new file mode 100644 index 0000000..c3d16d5 --- /dev/null +++ b/0.F_backport-vehicle-heater-cooler-intensity-reduced.patch @@ -0,0 +1,20 @@ +--- a/data/json/emit.json ++++ b/data/json/emit.json +@@ -185,7 +185,7 @@ + { + "id": "emit_heater_vehicle", + "type": "emit", +- "field": "fd_hot_air3", ++ "field": "fd_hot_air2", + "intensity": 3, + "qty": 3, + "chance": 100 +@@ -193,7 +193,7 @@ + { + "id": "emit_cooler_vehicle", + "type": "emit", +- "field": "fd_cold_air3", ++ "field": "fd_cold_air2", + "intensity": 3, + "qty": 3, + "chance": 100 diff --git a/0005-allow-bio-firestarter-on-smoker.patch b/0005-allow-bio-firestarter-on-smoker.patch deleted file mode 100644 index e81a493..0000000 --- a/0005-allow-bio-firestarter-on-smoker.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/src/iexamine.cpp -+++ b/src/iexamine.cpp -@@ -4868,18 +4868,30 @@ - return; - } - -- if( !p.has_charges( "fire", 1 ) ) { -+ const bool has_bionic_firestarter = p.has_bionic( bio_lighter ) && -+ p.enough_power_for( bio_lighter ); -+ -+ if( !has_bionic_firestarter && !p.has_charges( "fire", 1 ) ) { - add_msg( _( "This smoking rack is ready to be fired, but you have no fire source." ) ); - return; - } else if( !query_yn( _( "Fire the smoking rack?" ) ) ) { - return; - } - -- p.use_charges( "fire", 1 ); -- for( auto &it : g->m.i_at( examp ) ) { -- if( it.has_flag( flag_SMOKABLE ) ) { -- it.process_temperature_rot( 1, examp, nullptr ); -- it.set_flag( flag_PROCESSING ); -+ if( has_bionic_firestarter ) { -+ for( auto &it : g->m.i_at( examp ) ) { -+ if( it.has_flag( flag_SMOKABLE ) ) { -+ it.process_temperature_rot( 1, examp, nullptr ); -+ it.set_flag( flag_PROCESSING ); -+ } -+ } -+ } else { -+ p.use_charges( "fire", 1 ); -+ for( auto &it : g->m.i_at( examp ) ) { -+ if( it.has_flag( flag_SMOKABLE ) ) { -+ it.process_temperature_rot( 1, examp, nullptr ); -+ it.set_flag( flag_PROCESSING ); -+ } - } - } - g->m.furn_set( examp, next_smoker_type ); diff --git a/0005-lumbermill-gasoline-not-spilled.patch b/0005-lumbermill-gasoline-not-spilled.patch new file mode 100644 index 0000000..05e63ac --- /dev/null +++ b/0005-lumbermill-gasoline-not-spilled.patch @@ -0,0 +1,11 @@ +--- a/data/json/mapgen/lumbermill.json ++++ b/data/json/mapgen/lumbermill.json +@@ -51,7 +51,7 @@ + "v 2 __________________________________", + "v vvvvv *___________________________1 1 ____", + "v vooov______________________ ____ 121 1 v", +- "v voGoV_____________ #.......# ____ 1 1*1 1 1 v", ++ "v voooV_____________ #.......# ____ 1 1*1 1 1 v", + "v vooov_________ #L.....L#* ____* 1 1 1 2 v", + "v vvvvv ______ * *wL.....Lw ____1 1 1 1 *v", + "v 1____ 2 #L.....L# * ____1 1* 1 v", diff --git a/0006-community-garden-fertilizer-not-spilled.patch b/0006-community-garden-fertilizer-not-spilled.patch new file mode 100644 index 0000000..dfc3d29 --- /dev/null +++ b/0006-community-garden-fertilizer-not-spilled.patch @@ -0,0 +1,17 @@ +--- a/data/json/mapgen/garden_community.json ++++ b/data/json/mapgen/garden_community.json +@@ -141,10 +141,10 @@ + "|": "f_null" + }, + "place_liquids": [ +- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 4, "y": 4 }, +- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 4, "y": 5 }, +- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 5, "y": 4 }, +- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 5, "y": 5 } ++ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 9, "y": 9 }, ++ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 10, "y": 9 }, ++ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 9, "y": 10 }, ++ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 10, "y": 10 } + ], + "items": { "D": { "item": "hydro", "chance": 15 }, "#": { "item": "hydro", "chance": 15 } }, + "place_items": [ diff --git a/0006-npcs-eat-when-hungry.patch b/0006-npcs-eat-when-hungry.patch deleted file mode 100644 index 2074bef..0000000 --- a/0006-npcs-eat-when-hungry.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/npcmove.cpp -+++ b/src/npcmove.cpp -@@ -1829,7 +1829,9 @@ - } - - if( one_in( 3 ) && ( get_thirst() > 40 || -- get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() * 0.95 ) ) { -+ get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() * 0.95 || -+ ( get_hunger() > 160 && -+ ( get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() ) ) ) ) { - if( consume_food_from_camp() ) { - return npc_noop; - } -@@ -3697,12 +3699,15 @@ - return true; - } - faction *yours = g->u.get_faction(); -- int camp_kcals = std::min( std::max( 0, 19 * get_healthy_kcal() / 20 - get_stored_kcal() - -+ int camp_kcals = std::min( std::max( 0, get_healthy_kcal() - get_stored_kcal() - - stomach.get_calories() ), yours->food_supply ); - if( camp_kcals > 0 ) { - mod_hunger( -camp_kcals ); - mod_stored_kcal( camp_kcals ); - yours->food_supply -= camp_kcals; -+ stomach.mod_calories( camp_kcals ); -+ stomach.mod_contents( -2400_ml ); -+ stomach.mod_contents( 1200_ml ); - return true; - } - return false; diff --git a/0007-lumbermill-gasoline-not-spilled.patch b/0007-lumbermill-gasoline-not-spilled.patch deleted file mode 100644 index 05e63ac..0000000 --- a/0007-lumbermill-gasoline-not-spilled.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/data/json/mapgen/lumbermill.json -+++ b/data/json/mapgen/lumbermill.json -@@ -51,7 +51,7 @@ - "v 2 __________________________________", - "v vvvvv *___________________________1 1 ____", - "v vooov______________________ ____ 121 1 v", -- "v voGoV_____________ #.......# ____ 1 1*1 1 1 v", -+ "v voooV_____________ #.......# ____ 1 1*1 1 1 v", - "v vooov_________ #L.....L#* ____* 1 1 1 2 v", - "v vvvvv ______ * *wL.....Lw ____1 1 1 1 *v", - "v 1____ 2 #L.....L# * ____1 1* 1 v", diff --git a/0007-oxyacetylene-from-oxygen.patch b/0007-oxyacetylene-from-oxygen.patch new file mode 100644 index 0000000..8da7688 --- /dev/null +++ b/0007-oxyacetylene-from-oxygen.patch @@ -0,0 +1,12 @@ +--- a/data/json/recipes/ammo/weldgas.json ++++ b/data/json/recipes/ammo/weldgas.json +@@ -7,8 +8,9 @@ + "charges": 120, + "book_learn": [ [ "textbook_chemistry", 4 ], [ "textbook_gaswarfare", 5 ], [ "atomic_survival", 3 ] ], + "qualities": [ { "id": "PRESSURIZATION", "level": 1 } ], ++ "tools": [ [ [ "oxygen_tank", 24 ], [ "oxygen_cylinder", 24 ], [ "smoxygen_tank", 24 ] ] ], +- "components": [ [ [ "oxygen", 24 ] ], [ [ "acetylene", 96 ] ] ] ++ "components": [ [ [ "acetylene", 96 ] ] ] + }, + { + "result": "acetylene", diff --git a/0008-community-garden-fertilizer-not-spilled.patch b/0008-community-garden-fertilizer-not-spilled.patch deleted file mode 100644 index dfc3d29..0000000 --- a/0008-community-garden-fertilizer-not-spilled.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/data/json/mapgen/garden_community.json -+++ b/data/json/mapgen/garden_community.json -@@ -141,10 +141,10 @@ - "|": "f_null" - }, - "place_liquids": [ -- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 4, "y": 4 }, -- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 4, "y": 5 }, -- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 5, "y": 4 }, -- { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 5, "y": 5 } -+ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 9, "y": 9 }, -+ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 10, "y": 9 }, -+ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 9, "y": 10 }, -+ { "liquid": "fertilizer_liquid", "chance": 1, "amount": [ 2, 3 ], "x": 10, "y": 10 } - ], - "items": { "D": { "item": "hydro", "chance": 15 }, "#": { "item": "hydro", "chance": 15 } }, - "place_items": [ diff --git a/0008-npc-can-use-soporific.patch b/0008-npc-can-use-soporific.patch new file mode 100644 index 0000000..ea0f8db --- /dev/null +++ b/0008-npc-can-use-soporific.patch @@ -0,0 +1,10 @@ +--- a/data/json/bionics.json ++++ b/data/json/bionics.json +@@ -1196,6 +1196,6 @@ + "name": { "str": "Soporific Induction" }, + "description": "An electrode has been implanted into your brain's ventrolateral preoptic nucleus. It turns on whenever you're trying to fall asleep, creating an artificial but effective sensation of fatigue.", + "occupied_bodyparts": [ [ "HEAD", 1 ] ], +- "flags": [ "BIONIC_TOGGLED" ] ++ "flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ] + } + ] diff --git a/0009-npc-can-use-gas-fuel.patch b/0009-npc-can-use-gas-fuel.patch new file mode 100644 index 0000000..f7fc958 --- /dev/null +++ b/0009-npc-can-use-gas-fuel.patch @@ -0,0 +1,11 @@ +--- a/data/json/items/bionics.json ++++ b/data/json/items/bionics.json +@@ -741,7 +741,7 @@ + }, + { + "id": "bio_fuel_cell_gasoline", +- "copy-from": "bionic_general", ++ "copy-from": "bionic_general_npc_usable", + "type": "BIONIC_ITEM", + "name": { "str": "Gasoline Fuel Cell CBM" }, + "looks_like": "bio_int_enhancer", diff --git a/0009-oxyacetylene-from-oxygen.patch b/0009-oxyacetylene-from-oxygen.patch deleted file mode 100644 index 8da7688..0000000 --- a/0009-oxyacetylene-from-oxygen.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/data/json/recipes/ammo/weldgas.json -+++ b/data/json/recipes/ammo/weldgas.json -@@ -7,8 +8,9 @@ - "charges": 120, - "book_learn": [ [ "textbook_chemistry", 4 ], [ "textbook_gaswarfare", 5 ], [ "atomic_survival", 3 ] ], - "qualities": [ { "id": "PRESSURIZATION", "level": 1 } ], -+ "tools": [ [ [ "oxygen_tank", 24 ], [ "oxygen_cylinder", 24 ], [ "smoxygen_tank", 24 ] ] ], -- "components": [ [ [ "oxygen", 24 ] ], [ [ "acetylene", 96 ] ] ] -+ "components": [ [ [ "acetylene", 96 ] ] ] - }, - { - "result": "acetylene", diff --git a/0010-22-casings-can-stack.patch b/0010-22-casings-can-stack.patch new file mode 100644 index 0000000..4085863 --- /dev/null +++ b/0010-22-casings-can-stack.patch @@ -0,0 +1,17 @@ +--- a/data/json/items/generic/casing.json ++++ b/data/json/items/generic/casins.json +@@ -32,13 +32,9 @@ + { + "id": "22_casing_new", ++ "copy-from": "casing", + "type": "GENERIC", +- "category": "spare_parts", +- "price": 100, + "name": { "str": "unused .22 casing" }, +- "symbol": "=", +- "color": "yellow", + "description": "An unfired, like-new .22 round casing, with the primer still intact.", +- "material": [ "powder", "brass" ], + "volume": "3 ml", + "weight": "1 g" + }, diff --git a/0010-ammo-loudness-ap-times-2.patch b/0010-ammo-loudness-ap-times-2.patch deleted file mode 100644 index 3def080..0000000 --- a/0010-ammo-loudness-ap-times-2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/item_factory.cpp -+++ b/src/item_factory.cpp -@@ -221,7 +221,7 @@ - if( obj.ammo->loudness < 0 ) { - obj.ammo->loudness = obj.ammo->range * 2; - for( const damage_unit &du : obj.ammo->damage ) { -- obj.ammo->loudness += ( du.amount + du.res_pen ) * 2; -+ obj.ammo->loudness += ( du.amount * 2 ) + ( du.res_pen * 2 / 3 ); - } - } - diff --git a/0011-4570-ammo-can-be-dismantled.patch b/0011-4570-ammo-can-be-dismantled.patch new file mode 100644 index 0000000..3681df5 --- /dev/null +++ b/0011-4570-ammo-can-be-dismantled.patch @@ -0,0 +1,34 @@ +--- a/data/json/recipes/ammo/rifle.json ++++ b/data/json/recipes/ammo/rifle.json +@@ -385,6 +385,7 @@ + "batch_time_factors": [ 60, 5 ], + "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], + "charges": 1, ++ "reversible": true, + "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], + "components": [ + [ [ "4570_casing", 1 ] ], +@@ -406,6 +407,7 @@ + "batch_time_factors": [ 60, 5 ], + "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], + "charges": 1, ++ "reversible": true, + "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], + "components": [ + [ [ "4570_casing", 1 ] ], +@@ -426,6 +428,7 @@ + "batch_time_factors": [ 60, 5 ], + "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], + "charges": 1, ++ "reversible": true, + "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], + "components": [ + [ [ "4570_casing", 1 ] ], +@@ -446,6 +449,7 @@ + "batch_time_factors": [ 60, 5 ], + "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], + "charges": 1, ++ "reversible": true, + "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], + "components": [ [ [ "4570_casing", 1 ] ], [ [ "lgrifle_primer", 1 ] ], [ [ "chem_black_powder", 12 ] ], [ [ "lead", 9 ] ] ] + }, diff --git a/0011-npc-can-use-soporific.patch b/0011-npc-can-use-soporific.patch deleted file mode 100644 index ea0f8db..0000000 --- a/0011-npc-can-use-soporific.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/data/json/bionics.json -+++ b/data/json/bionics.json -@@ -1196,6 +1196,6 @@ - "name": { "str": "Soporific Induction" }, - "description": "An electrode has been implanted into your brain's ventrolateral preoptic nucleus. It turns on whenever you're trying to fall asleep, creating an artificial but effective sensation of fatigue.", - "occupied_bodyparts": [ [ "HEAD", 1 ] ], -- "flags": [ "BIONIC_TOGGLED" ] -+ "flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ] - } - ] diff --git a/0012-npc-can-use-gas-fuel.patch b/0012-npc-can-use-gas-fuel.patch deleted file mode 100644 index f7fc958..0000000 --- a/0012-npc-can-use-gas-fuel.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/data/json/items/bionics.json -+++ b/data/json/items/bionics.json -@@ -741,7 +741,7 @@ - }, - { - "id": "bio_fuel_cell_gasoline", -- "copy-from": "bionic_general", -+ "copy-from": "bionic_general_npc_usable", - "type": "BIONIC_ITEM", - "name": { "str": "Gasoline Fuel Cell CBM" }, - "looks_like": "bio_int_enhancer", diff --git a/0013-22-casings-can-stack.patch b/0013-22-casings-can-stack.patch deleted file mode 100644 index 4085863..0000000 --- a/0013-22-casings-can-stack.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/data/json/items/generic/casing.json -+++ b/data/json/items/generic/casins.json -@@ -32,13 +32,9 @@ - { - "id": "22_casing_new", -+ "copy-from": "casing", - "type": "GENERIC", -- "category": "spare_parts", -- "price": 100, - "name": { "str": "unused .22 casing" }, -- "symbol": "=", -- "color": "yellow", - "description": "An unfired, like-new .22 round casing, with the primer still intact.", -- "material": [ "powder", "brass" ], - "volume": "3 ml", - "weight": "1 g" - }, diff --git a/0014-4570-ammo-can-be-dismantled.patch b/0014-4570-ammo-can-be-dismantled.patch deleted file mode 100644 index 3681df5..0000000 --- a/0014-4570-ammo-can-be-dismantled.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/data/json/recipes/ammo/rifle.json -+++ b/data/json/recipes/ammo/rifle.json -@@ -385,6 +385,7 @@ - "batch_time_factors": [ 60, 5 ], - "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], - "charges": 1, -+ "reversible": true, - "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], - "components": [ - [ [ "4570_casing", 1 ] ], -@@ -406,6 +407,7 @@ - "batch_time_factors": [ 60, 5 ], - "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], - "charges": 1, -+ "reversible": true, - "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], - "components": [ - [ [ "4570_casing", 1 ] ], -@@ -426,6 +428,7 @@ - "batch_time_factors": [ 60, 5 ], - "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], - "charges": 1, -+ "reversible": true, - "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], - "components": [ - [ [ "4570_casing", 1 ] ], -@@ -446,6 +449,7 @@ - "batch_time_factors": [ 60, 5 ], - "book_learn": [ [ "recipe_bullets", 2 ], [ "mag_rifle", 4 ] ], - "charges": 1, -+ "reversible": true, - "using": [ [ "bullet_forming", 15 ], [ "ammo_bullet", 8 ] ], - "components": [ [ [ "4570_casing", 1 ] ], [ [ "lgrifle_primer", 1 ] ], [ [ "chem_black_powder", 12 ] ], [ [ "lead", 9 ] ] ] - }, diff --git a/0015-stop-sleeping-on-tables.patch b/0015-stop-sleeping-on-tables.patch deleted file mode 100644 index b114fdd..0000000 --- a/0015-stop-sleeping-on-tables.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- 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 { diff --git a/PKGBUILD b/PKGBUILD index c4797e0..b9cd62c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -13,7 +13,7 @@ pkgname=(cataclysm-dda cataclysm-dda-tiles) pkgname=cataclysm-dda pkgver=0.E.3 _pkgver=0.E-3 -pkgrel=1.16 +pkgrel=1.17 pkgdesc="A post-apocalyptic roguelike." #url="http://cataclysmrl.blogspot.com/" #url="http://www.cataclysm.glyphgryph.com/" @@ -26,24 +26,28 @@ makedepends=('sdl2_image' 'sdl2_ttf' 'sdl2_mixer' 'freetype2' 'astyle') source=("$pkgname-$_pkgver.tar.gz::https://github.com/CleverRaven/Cataclysm-DDA/archive/$_pkgver.tar.gz" "cataclysm-dda.desktop" "cataclysm-dda-tiles.desktop" - "0.F-backport-vehicle-heater-cooler-intensity-reduced.patch" - "0.F-backport-tacoma-barn-door-position.patch" - "0.F-backport-make-firestation-shelter-wells-npc-drinkable.patch" + + "0.F_backport-vehicle-heater-cooler-intensity-reduced.patch" + "0.F_backport-tacoma-barn-door-position.patch" + "0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch" + "0001-quiverfull-house-correct-stairs.patch" "0002-ankle-ammo-pouch-is-not-a-backpack.patch" "0003-inconsistent-ammo-names.patch" "0004-tacoma-clinic-add-missing-floor.patch" - "0005-allow-bio-firestarter-on-smoker.patch" - "0006-npcs-eat-when-hungry.patch" - "0007-lumbermill-gasoline-not-spilled.patch" - "0008-community-garden-fertilizer-not-spilled.patch" - "0009-oxyacetylene-from-oxygen.patch" - "0010-ammo-loudness-ap-times-2.patch" - "0011-npc-can-use-soporific.patch" - "0012-npc-can-use-gas-fuel.patch" - "0013-22-casings-can-stack.patch" - "0014-4570-ammo-can-be-dismantled.patch" - "0015-stop-sleeping-on-tables.patch" + "0005-lumbermill-gasoline-not-spilled.patch" + "0006-community-garden-fertilizer-not-spilled.patch" + "0007-oxyacetylene-from-oxygen.patch" + "0008-npc-can-use-soporific.patch" + "0009-npc-can-use-gas-fuel.patch" + "0010-22-casings-can-stack.patch" + "0011-4570-ammo-can-be-dismantled.patch" + + "jc_ammo-loudness-ap-times-2.patch" + "jc_allow-bio-firestarter-on-smoker.patch" + "jc_npcs-eat-when-hungry.patch" + "jc_stop-non-faction-npc-sleep-depirvation.patch" + "cataclysm-dda-tileset_undeadpeople-legacy.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-tileset_undeadpeople-legacy.git/snapshot/cataclysm-dda-tileset_undeadpeople-legacy-master.tar.xz" "cataclysm-dda-soundpack_jcsoundpack.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-soundpack_jcsoundpack.git/snapshot/cataclysm-dda-soundpack_jcsoundpack-master.tar.xz" "cataclysm-dda-musicpack_coag-musicpack.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-musicpack_coag-musicpack.git/snapshot/cataclysm-dda-musicpack_coag-musicpack-master.tar.xz" @@ -58,17 +62,17 @@ b2sums=('7a825d8ce8827ccb45afb6005d4f33c6810e33e2fa375f2f7d1c878565fd61e00362e0d 'af47a9372ba990bc97d17362c8d89847177e6cbefaa241c23bcdc670ef29d82bf150983f4c730753cabaa77a01f8e966307831cdc192a92237d5f3e8e6599d2b' 'd6b6e3572edb886eb721c50bd0e00ba110c7b226c94948189be63d5fa765cfa0785f2c5f8ffd9ce8b68f327ae20e9a1d419ad2857f5af7c069c4b8ba3ef99ac0' 'b8a64accada87ee5be989c5307805610c9b5c0327bc107aab237ac3225dd9e4c51b6c79a2a7de15fe187d3c32d7cbe1c462f9b0e9fb5d5a55a74236c7061e96e' - 'c2ff7458d4f71a3c328a49795804b89c75ac6c4f4ec193c899501346afdba9673b8624bf60ffa3aea5256412248ff304e8731914971b074aee644b2c465ac483' - 'b256081baa22b6c0f2a56c4151393146451fe119cd724fc4d883331643e420348e6e6c54c4f32e34d287090e917f9223cac23b6275677e4c3d23cf4b38229904' '85aeb5920ee5879848be4057324153a077fe907bed527ed8f9b80a3c5ee1ef64786f63ee2999f5ba74e80a43e99ded3280ce27759c1f7b73259a6e2b5e584aa8' '58a94409205f7b670ab5745b8cbc234a38efd6a6217cef4efb7e397f091092e3e0c7790706b0a42accaa83d7509b8e244a98b9f0ba78349ee85f3164745c3501' 'd34d673fe04d4317ef3c1ac3f088b6614f7c20414cfe44aa0ff71bdc932c517c4e6295492f158ced84232af8f54d1672ae56078b156593d58bf8fe7ffc3d475d' - '92cde696eec00e6758b58e73e8bc60ad1a73bb2a18d4fdfd24a19b5be715305a047943a02d94a9703c101ca0c769dbeb816f1f28809345bae0fec42fbc27bb34' '9cf47504583e16ba2a826bf9431f83ffd57121becb7980bbfb6996929a6bbb5a872cd2c310c4e1d457d59205b0abac306291722aba27ab7fa5a0bf45314d8b56' '20fbcff9879bdc06a40f56289396a03a9d6fad8aaa7ade0154c6397c0e842d0d4e12aa05fa305153bab0cffdaea670cc91882b8def07f5f422bf010c7fbbc806' 'dd36b2b64e4999c0f188c837dae1f9c76d537a08b1c5996827a4d3028b688fe023be3711380189ed5c05316b17d6ab3e59669114ec699a3a0ee32808394ad12c' 'c0d32a5edb420de5b2d95d1fed8753e9a6f45ab406aa2861dd5f038409c762ab40acdeec64b51713b71aa1453c0489a62af76534652a5c4d9634ac7e0eb431b4' - '2ee472dca07bb8401040d4bb9358282de8fc76778bc294ce0ee255012519872f30043d7f7e9f08a7744b11c083daa07116ab2017a85786c692500b6484160f38' + '92cde696eec00e6758b58e73e8bc60ad1a73bb2a18d4fdfd24a19b5be715305a047943a02d94a9703c101ca0c769dbeb816f1f28809345bae0fec42fbc27bb34' + 'c2ff7458d4f71a3c328a49795804b89c75ac6c4f4ec193c899501346afdba9673b8624bf60ffa3aea5256412248ff304e8731914971b074aee644b2c465ac483' + 'b256081baa22b6c0f2a56c4151393146451fe119cd724fc4d883331643e420348e6e6c54c4f32e34d287090e917f9223cac23b6275677e4c3d23cf4b38229904' + 'ce82294e480ad42f0001c799fd8131b60024b6097653f3c57564c75e54596616e376f0d7f1cf4e54d8c302a61ef164b4323f795bfa19b2c13ab9e927d37f1600' 'c5397b4b740966e4b75629d98021141686ac3150b3af803e59afa3b062ba561248c77cbf8e2b7f2a97a273e7fbfdd76ab76d6485344318d0cdb5bb374f46e4c3' 'f54bb10b6c5920b22942b1e312c315280afb720d3a897dce9333563cae3343668460d24b7d01bf36768974c729d92177e886f5ee0d22d746b19454a2ab6208fb' 'b9309da09b165fb57e83f84e3584d2479bd3336ed86e181e5df2d27daa92bd55d03d7f3fc226f03696af5f0f32d8e0e7ecd26ae7e50eed0200d0b0feaad07efb') @@ -84,17 +88,17 @@ prepare() { # Backports from 0.F # Fix Vehicle Heater and Cooler to be less severe - patch -Np1 -i "$srcdir"/0.F-backport-vehicle-heater-cooler-intensity-reduced.patch + patch -Np1 -i "$srcdir"/0.F_backport-vehicle-heater-cooler-intensity-reduced.patch # Fix tacoma barn doors being placed in the same spot twice - patch -Np1 -i "$srcdir"/0.F-backport-tacoma-barn-door-position.patch + patch -Np1 -i "$srcdir"/0.F_backport-tacoma-barn-door-position.patch # Fix npcs unable to drink from firestation and shelter basecamps wells - patch -Np1 -i "$srcdir"/0.F-backport-make-firestation-shelter-wells-npc-drinkable.patch + patch -Np1 -i "$srcdir"/0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch # Various other fixes for bugs I came across - # Fix Quiverfull house to have the correct stairs + # Fix Quiverfull house to have the correct stairs that modify json patch -Np1 -i "$srcdir"/0001-quiverfull-house-correct-stairs.patch # Fix Ankle Ammo Pouch to not look like a backpack @@ -106,38 +110,40 @@ prepare() { # Fix missing floor in tacoma clinic patch -Np1 -i "$srcdir"/0004-tacoma-clinic-add-missing-floor.patch - # Fix smoker racks not accepting bionic firestarter - patch -Np1 -i "$srcdir"/0005-allow-bio-firestarter-on-smoker.patch - - # Fix NPCs not eating until they drop below normal weight and not becoming full from eating the basecamp stockpile - patch -Np1 -i "$srcdir"/0006-npcs-eat-when-hungry.patch - # Fix lumbermill gasoline being spilled instead of being inside the gas pump - patch -Np1 -i "$srcdir"/0007-lumbermill-gasoline-not-spilled.patch + patch -Np1 -i "$srcdir"/0005-lumbermill-gasoline-not-spilled.patch # Fix community garden liquid fertilizer being in a pit instead of in the storage tanks - patch -Np1 -i "$srcdir"/0008-community-garden-fertilizer-not-spilled.patch + patch -Np1 -i "$srcdir"/0006-community-garden-fertilizer-not-spilled.patch # Fix oxyacetylene to be craftable from oxygen tanks - patch -Np1 -i "$srcdir"/0009-oxyacetylene-from-oxygen.patch - - # Fix ammo loudness mulitplying by six instead of two - patch -Np1 -i "$srcdir"/0010-ammo-loudness-ap-times-2.patch + patch -Np1 -i "$srcdir"/0007-oxyacetylene-from-oxygen.patch # Fix npc not being able to install soporific inducer - patch -Np1 -i "$srcdir"/0011-npc-can-use-soporific.patch + patch -Np1 -i "$srcdir"/0008-npc-can-use-soporific.patch # Fix npc not being able to install gasoline fuel cell - patch -Np1 -i "$srcdir"/0012-npc-can-use-gas-fuel.patch + patch -Np1 -i "$srcdir"/0009-npc-can-use-gas-fuel.patch # Fix .22 casings not stacking when every other casing stacks - patch -Np1 -i "$srcdir"/0013-22-casings-can-stack.patch + patch -Np1 -i "$srcdir"/0010-22-casings-can-stack.patch # Fix reloaded 45-70 rounds not allowing dismantling - patch -Np1 -i "$srcdir"/0014-4570-ammo-can-be-dismantled.patch + patch -Np1 -i "$srcdir"/0011-4570-ammo-can-be-dismantled.patch + + + # Various other fixes for bugs I came across that modify src + # Fix ammo loudness mulitplying by six instead of two + patch -Np1 -i "$srcdir"/jc_ammo-loudness-ap-times-2.patch + + # Fix smoker racks not accepting bionic firestarter + patch -Np1 -i "$srcdir"/jc_allow-bio-firestarter-on-smoker.patch + + # Fix NPCs not eating until they drop below normal weight and not becoming full from eating the basecamp stockpile + patch -Np1 -i "$srcdir"/jc_npcs-eat-when-hungry.patch - # Fix NPCs preferring tables, bumpers, and funnels to cots and bedrolls. - patch -Np1 -i "$srcdir"/0015-stop-sleeping-on-tables.patch + # Fix Non-Player facton NPCs from becoming sleep deprived + patch -Np1 -i "$srcdir"/jc_stop-non-faction-npc-sleep-depirvation.patch } build() { diff --git a/jc_allow-bio-firestarter-on-smoker.patch b/jc_allow-bio-firestarter-on-smoker.patch new file mode 100644 index 0000000..e81a493 --- /dev/null +++ b/jc_allow-bio-firestarter-on-smoker.patch @@ -0,0 +1,39 @@ +--- a/src/iexamine.cpp ++++ b/src/iexamine.cpp +@@ -4868,18 +4868,30 @@ + return; + } + +- if( !p.has_charges( "fire", 1 ) ) { ++ const bool has_bionic_firestarter = p.has_bionic( bio_lighter ) && ++ p.enough_power_for( bio_lighter ); ++ ++ if( !has_bionic_firestarter && !p.has_charges( "fire", 1 ) ) { + add_msg( _( "This smoking rack is ready to be fired, but you have no fire source." ) ); + return; + } else if( !query_yn( _( "Fire the smoking rack?" ) ) ) { + return; + } + +- p.use_charges( "fire", 1 ); +- for( auto &it : g->m.i_at( examp ) ) { +- if( it.has_flag( flag_SMOKABLE ) ) { +- it.process_temperature_rot( 1, examp, nullptr ); +- it.set_flag( flag_PROCESSING ); ++ if( has_bionic_firestarter ) { ++ for( auto &it : g->m.i_at( examp ) ) { ++ if( it.has_flag( flag_SMOKABLE ) ) { ++ it.process_temperature_rot( 1, examp, nullptr ); ++ it.set_flag( flag_PROCESSING ); ++ } ++ } ++ } else { ++ p.use_charges( "fire", 1 ); ++ for( auto &it : g->m.i_at( examp ) ) { ++ if( it.has_flag( flag_SMOKABLE ) ) { ++ it.process_temperature_rot( 1, examp, nullptr ); ++ it.set_flag( flag_PROCESSING ); ++ } + } + } + g->m.furn_set( examp, next_smoker_type ); diff --git a/jc_ammo-loudness-ap-times-2.patch b/jc_ammo-loudness-ap-times-2.patch new file mode 100644 index 0000000..3def080 --- /dev/null +++ b/jc_ammo-loudness-ap-times-2.patch @@ -0,0 +1,11 @@ +--- a/src/item_factory.cpp ++++ b/src/item_factory.cpp +@@ -221,7 +221,7 @@ + if( obj.ammo->loudness < 0 ) { + obj.ammo->loudness = obj.ammo->range * 2; + for( const damage_unit &du : obj.ammo->damage ) { +- obj.ammo->loudness += ( du.amount + du.res_pen ) * 2; ++ obj.ammo->loudness += ( du.amount * 2 ) + ( du.res_pen * 2 / 3 ); + } + } + diff --git a/jc_npcs-eat-when-hungry.patch b/jc_npcs-eat-when-hungry.patch new file mode 100644 index 0000000..2074bef --- /dev/null +++ b/jc_npcs-eat-when-hungry.patch @@ -0,0 +1,30 @@ +--- a/src/npcmove.cpp ++++ b/src/npcmove.cpp +@@ -1829,7 +1829,9 @@ + } + + if( one_in( 3 ) && ( get_thirst() > 40 || +- get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() * 0.95 ) ) { ++ get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() * 0.95 || ++ ( get_hunger() > 160 && ++ ( get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() ) ) ) ) { + if( consume_food_from_camp() ) { + return npc_noop; + } +@@ -3697,12 +3699,15 @@ + return true; + } + faction *yours = g->u.get_faction(); +- int camp_kcals = std::min( std::max( 0, 19 * get_healthy_kcal() / 20 - get_stored_kcal() - ++ int camp_kcals = std::min( std::max( 0, get_healthy_kcal() - get_stored_kcal() - + stomach.get_calories() ), yours->food_supply ); + if( camp_kcals > 0 ) { + mod_hunger( -camp_kcals ); + mod_stored_kcal( camp_kcals ); + yours->food_supply -= camp_kcals; ++ stomach.mod_calories( camp_kcals ); ++ stomach.mod_contents( -2400_ml ); ++ stomach.mod_contents( 1200_ml ); + return true; + } + return false; diff --git a/jc_stop-non-faction-npc-sleep-depirvation.patch b/jc_stop-non-faction-npc-sleep-depirvation.patch new file mode 100644 index 0000000..fb8941c --- /dev/null +++ b/jc_stop-non-faction-npc-sleep-depirvation.patch @@ -0,0 +1,10 @@ +--- a/src/npcmove.cpp ++++ b/src/npcmove.cpp +@@ -1871,6 +1871,7 @@ + if( !is_player_ally() ) { + // TODO: Make tired NPCs handle sleep offscreen + set_fatigue( 0 ); ++ set_sleep_deprivation( 0 ); + return npc_undecided; + } + -- cgit v1.2.1