From 7468233604282bd5400e5cbbd8518f8e2900d0d0 Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Sun, 17 Jan 2021 09:19:11 +0300 Subject: [PATCH 1/4] Replace all fuel that spawns in mil bases with jp8 --- data/json/itemgroups/vehicles_fuel_related.json | 8 ++++++++ data/json/mapgen/military/mil_base/mil_base_z0.json | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/data/json/itemgroups/vehicles_fuel_related.json b/data/json/itemgroups/vehicles_fuel_related.json index bb9b7b16c0e10..264105cebc0a0 100644 --- a/data/json/itemgroups/vehicles_fuel_related.json +++ b/data/json/itemgroups/vehicles_fuel_related.json @@ -1,4 +1,12 @@ [ + { + "type": "item_group", + "id": "fuel_jp8", + "items": [ + { "item": "jp8", "prob": 70, "charges-min": 950, "charges-max": 8000, "container-item": "jerrycan" }, + { "item": "jp8", "prob": 30, "charges-min": 3850, "charges-max": 20000, "container-item": "jerrycan_big" } + ] + }, { "type": "item_group", "id": "fuel_diesel", diff --git a/data/json/mapgen/military/mil_base/mil_base_z0.json b/data/json/mapgen/military/mil_base/mil_base_z0.json index 09f2f22bb06a5..ec1551be407c7 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z0.json +++ b/data/json/mapgen/military/mil_base/mil_base_z0.json @@ -121,8 +121,8 @@ "%": [ { "item": "mil_base_ash", "chance": 25, "repeat": [ 1, 15 ] } ] }, "place_loot": [ - { "group": "fuel_diesel", "x": 19, "y": 15, "chance": 75 }, - { "group": "fuel_diesel", "x": 45, "y": 11, "chance": 75 }, + { "group": "fuel_jp8", "x": 19, "y": 15, "chance": 75 }, + { "group": "fuel_jp8", "x": 45, "y": 11, "chance": 75 }, { "group": "mil_base_hmg", "x": 67, "y": 57, "chance": 10, "magazine": 100 } ], "place_monsters": [ @@ -732,7 +732,7 @@ { "item": "tinyweldtank", "x": 71, "y": [ 19, 20 ], "chance": 50, "repeat": [ 5, 10 ] }, { "item": "tinyweldtank", "x": 72, "y": [ 19, 20 ], "chance": 50, "repeat": [ 5, 10 ] }, { "item": "motor_oil", "x": 75, "y": [ 17, 18 ], "chance": 50, "repeat": [ 20, 40 ] }, - { "item": "diesel", "x": 75, "y": 19, "chance": 80, "repeat": [ 1, 10 ] }, + { "group": "fuel_jp8", "x": 75, "y": 19, "chance": 80, "repeat": [ 1, 10 ] }, { "item": "jerrycan", "x": 75, "y": 20, "chance": 80, "repeat": [ 1, 10 ] }, { "group": "supplies_metal", "x": 76, "y": [ 17, 20 ], "chance": 50, "repeat": [ 20, 80 ] }, { "item": "extinguisher", "x": 69, "y": 23, "chance": 75 }, @@ -1106,7 +1106,7 @@ "W": [ { "item": "mil_base_iv", "chance": 70 } ], "^": [ { "item": "mil_base_iv", "chance": 70 } ] }, - "gaspumps": { "p": { "fuel": "diesel", "amount": [ 200000, 1000000 ] } }, + "gaspumps": { "p": { "fuel": "jp8", "amount": [ 200000, 1000000 ] } }, "place_loot": [ { "group": "mil_base_hmg", "x": 65, "y": 46, "chance": 10, "magazine": 100 }, { "group": "SUS_janitors_closet", "x": 22, "y": 26, "chance": 90, "repeat": [ 1, 2 ] }, From 6de0eb73654946906c42d40c28166c00966999e0 Mon Sep 17 00:00:00 2001 From: actual-nh <74678550+actual-nh@users.noreply.github.com> Date: Sun, 17 Jan 2021 13:33:47 -0500 Subject: [PATCH 2/4] Update mapgen.cpp to allow jp8 fuel in pumps --- src/mapgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapgen.cpp b/src/mapgen.cpp index d6bbe217c2d9c..9cb2e5d88d125 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -1089,7 +1089,7 @@ class jmapgen_gaspump : public jmapgen_piece fuel = jsi.get_string( "fuel" ); // may want to not force this, if we want to support other fuels for some reason - if( fuel != "gasoline" && fuel != "diesel" ) { + if( fuel != "gasoline" && fuel != "diesel" && fuel != "jp8" ) { jsi.throw_error( "invalid fuel", "fuel" ); } } From 7f767f7929d270e5f525cc3c3e1919f894cc2c80 Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Tue, 26 Jan 2021 18:00:17 +0300 Subject: [PATCH 3/4] Fix jp8 missing pump_terrain --- .../terrain-manufactured.json | 48 +++++++++++++++++++ data/json/materials.json | 1 + 2 files changed, 49 insertions(+) diff --git a/data/json/furniture_and_terrain/terrain-manufactured.json b/data/json/furniture_and_terrain/terrain-manufactured.json index b418c6274f253..10b5f9ce740ca 100644 --- a/data/json/furniture_and_terrain/terrain-manufactured.json +++ b/data/json/furniture_and_terrain/terrain-manufactured.json @@ -156,6 +156,54 @@ ] } }, + { + "type": "terrain", + "id": "t_jp8_pump", + "name": "JP8 pump", + "looks_like": "t_gas_pump", + "description": "This pump is filled with JP8. If this gas dispenser doesn't give up the goods for free, you may have to pay at a nearby terminal.", + "symbol": "&", + "color": "red", + "move_cost": 0, + "coverage": 65, + "flags": [ "TRANSPARENT", "FLAMMABLE", "NOITEM", "SEALED", "CONTAINER", "REDUCE_SCENT", "PERMEABLE", "LIQUIDCONT" ], + "examine_action": "gaspump", + "bash": { + "str_min": 8, + "str_max": 150, + "sound": "crunch!", + "sound_fail": "clang!", + "ter_set": "t_jp8_pump_smashed", + "items": [ { "item": "scrap", "count": 1 } ] + } + }, + { + "type": "terrain", + "id": "t_jp8_pump_smashed", + "name": "smashed JP8 pump", + "description": "You're not getting any JP8 out of this pump any time soon. Some barbarian decided to take their frustration out on it.", + "symbol": "&", + "color": "light_green", + "looks_like": "t_diesel_pump_smashed", + "move_cost": 0, + "coverage": 55, + "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "PERMEABLE" ], + "bash": { + "str_min": 20, + "str_max": 150, + "explosive": 40, + "sound": "metal screeching!", + "sound_fail": "clang!", + "ter_set": "t_pavement", + "items": [ + { "item": "steel_lump", "prob": 50 }, + { "item": "steel_chunk", "count": [ 1, 4 ] }, + { "item": "pipe_fittings", "count": [ 2, 6 ] }, + { "item": "pipe", "count": [ 4, 8 ] }, + { "item": "scrap", "count": [ 3, 7 ] } + ] + } + }, { "type": "terrain", "id": "t_atm", diff --git a/data/json/materials.json b/data/json/materials.json index 744db630bf810..0a0633afbb134 100644 --- a/data/json/materials.json +++ b/data/json/materials.json @@ -770,6 +770,7 @@ "copy-from": "hydrocarbons", "fuel_data": { "energy": 34.7, + "pump_terrain": "t_jp8_pump", "explosion_data": { "chance_hot": 20, "chance_cold": 1000, "factor": 0.2, "fiery": false, "size_factor": 0.1 } } }, From 87e66b482fe0bfc73136031763e45cffb39201f3 Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Tue, 26 Jan 2021 16:11:51 +0000 Subject: [PATCH 4/4] Add double space after a sentence. Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com> --- data/json/furniture_and_terrain/terrain-manufactured.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/terrain-manufactured.json b/data/json/furniture_and_terrain/terrain-manufactured.json index 10b5f9ce740ca..2562090d9feda 100644 --- a/data/json/furniture_and_terrain/terrain-manufactured.json +++ b/data/json/furniture_and_terrain/terrain-manufactured.json @@ -161,7 +161,7 @@ "id": "t_jp8_pump", "name": "JP8 pump", "looks_like": "t_gas_pump", - "description": "This pump is filled with JP8. If this gas dispenser doesn't give up the goods for free, you may have to pay at a nearby terminal.", + "description": "This pump is filled with JP8. If this gas dispenser doesn't give up the goods for free, you may have to pay at a nearby terminal.", "symbol": "&", "color": "red", "move_cost": 0,