From ef01c8703aaeae8190446ab97e812317fe38653c Mon Sep 17 00:00:00 2001 From: eso Date: Thu, 16 May 2019 23:45:20 -0700 Subject: [PATCH] Add sandbags/earthbags, earthbag walls, adjust sandbag walls WIP (#29855) * Add sandbags/earthbags, earthbag walls, adjust sandbag walls --- data/json/construction.json | 32 +++++++-- data/json/furniture.json | 69 +++++++++++++++++--- data/json/items/chemicals_and_resources.json | 32 ++++++++- data/json/recipes/recipe_others.json | 22 +++++++ 4 files changed, 141 insertions(+), 14 deletions(-) diff --git a/data/json/construction.json b/data/json/construction.json index 2bf24a361a6a3..822ba48ae983e 100644 --- a/data/json/construction.json +++ b/data/json/construction.json @@ -704,8 +704,8 @@ "//": "Step 1: Build sandbag barricade", "category": "CONSTRUCT", "required_skills": [ [ "fabrication", 0 ] ], - "time": 60, - "components": [ [ [ "bag_canvas", 2 ] ], [ [ "material_sand", 20 ] ] ], + "time": 16, + "components": [ [ [ "sandbag", 16 ] ] ], "pre_note": "Can be deconstructed without tools.", "pre_special": "check_empty", "post_terrain": "f_sandbag_half" @@ -716,12 +716,36 @@ "//": "Step 2: Finish the sandbag wall", "category": "CONSTRUCT", "required_skills": [ [ "fabrication", 0 ] ], - "time": 90, - "components": [ [ [ "bag_canvas", 4 ] ], [ [ "material_sand", 40 ] ] ], + "time": 20, + "components": [ [ [ "sandbag", 20 ] ] ], "pre_note": "Can be deconstructed without tools.", "pre_terrain": "f_sandbag_half", "post_terrain": "f_sandbag_wall" }, + { + "type": "construction", + "description": "Build Earthbag Wall", + "//": "Step 1: Build earthbag barricade", + "category": "CONSTRUCT", + "required_skills": [ [ "fabrication", 0 ] ], + "time": 16, + "components": [ [ [ "earthbag", 16 ] ] ], + "pre_note": "Can be deconstructed without tools.", + "pre_special": "check_empty", + "post_terrain": "f_earthbag_half" + }, + { + "type": "construction", + "description": "Build Earthbag Wall", + "//": "Step 2: Finish the earthbag wall", + "category": "CONSTRUCT", + "required_skills": [ [ "fabrication", 0 ] ], + "time": 20, + "components": [ [ [ "earthbag", 20 ] ] ], + "pre_note": "Can be deconstructed without tools.", + "pre_terrain": "f_earthbag_half", + "post_terrain": "f_earthbag_wall" + }, { "type": "construction", "description": "Build Metal Wall", diff --git a/data/json/furniture.json b/data/json/furniture.json index fd4cca6ab9a86..898ea64a0dc3c 100644 --- a/data/json/furniture.json +++ b/data/json/furniture.json @@ -179,7 +179,7 @@ "name": "sandbag barricade", "symbol": "#", "bgcolor": "brown", - "description": "A sandbag, typically used for blocking bullets.", + "description": "A sandbag barricade, typically used for blocking bullets.", "move_cost_mod": -1, "coverage": 60, "required_str": -1, @@ -195,13 +195,13 @@ "PERMEABLE" ], "examine_action": "chainfence", - "deconstruct": { "items": [ { "item": "bag_canvas", "count": 2 }, { "item": "material_sand", "charges": 20 } ] }, + "deconstruct": { "items": [ { "item": "sandbag", "count": 16 } ] }, "bash": { "str_min": 12, "str_max": 60, "sound": "rrrip!", "sound_fail": "whump.", - "items": [ { "item": "bag_canvas", "count": [ 1, 2 ] }, { "item": "material_sand", "charges": [ 5, 20 ] } ] + "items": [ { "item": "bag_canvas", "count": [ 10, 16 ] }, { "item": "material_sand", "charges": [ 800, 960 ] } ] } }, { @@ -212,20 +212,71 @@ "bgcolor": "brown", "move_cost_mod": -1, "coverage": 95, - "description": "A few stacked sandbags.", + "description": "A sandbag wall.", "required_str": -1, "flags": [ "NOITEM", "BLOCKSDOOR", "EASY_DECONSTRUCT", "MINEABLE", "BLOCK_WIND" ], - "deconstruct": { - "items": [ { "item": "bag_canvas", "count": 4 }, { "item": "material_sand", "charges": 40 } ], - "furn_set": "f_sandbag_half" - }, + "deconstruct": { "items": [ { "item": "sandbag", "count": 20 } ], "furn_set": "f_sandbag_half" }, "bash": { "str_min": 24, "str_max": 80, "sound": "rrrip!", "sound_fail": "whump.", "furn_set": "f_sandbag_half", - "items": [ { "item": "bag_canvas", "count": [ 1, 4 ] }, { "item": "material_sand", "charges": [ 10, 40 ] } ] + "items": [ { "item": "bag_canvas", "count": [ 15, 20 ] }, { "item": "material_sand", "charges": [ 1000, 1200 ] } ] + } + }, + { + "type": "furniture", + "id": "f_earthbag_half", + "name": "earthbag barricade", + "symbol": "#", + "looks_like": "f_sandbag_half", + "bgcolor": "brown", + "description": "An earthbag barricade, typically used for blocking bullets.", + "move_cost_mod": -1, + "coverage": 60, + "required_str": -1, + "flags": [ + "CLIMB_SIMPLE", + "TRANSPARENT", + "MOUNTABLE", + "BLOCKSDOOR", + "SHORT", + "EASY_DECONSTRUCT", + "THIN_OBSTACLE", + "CLIMBABLE", + "PERMEABLE" + ], + "examine_action": "chainfence", + "deconstruct": { "items": [ { "item": "sandbag", "count": 16 } ] }, + "bash": { + "str_min": 12, + "str_max": 60, + "sound": "rrrip!", + "sound_fail": "whump.", + "items": [ { "item": "bag_canvas", "count": [ 10, 16 ] }, { "item": "material_sand", "charges": [ 40, 48 ] } ] + } + }, + { + "type": "furniture", + "id": "f_earthbag_wall", + "name": "earthbag wall", + "symbol": "#", + "looks_like": "f_sandbag_wall", + "bgcolor": "brown", + "move_cost_mod": -1, + "coverage": 95, + "description": "An earthbag wall.", + "required_str": -1, + "flags": [ "NOITEM", "BLOCKSDOOR", "EASY_DECONSTRUCT", "MINEABLE", "BLOCK_WIND" ], + "deconstruct": { "items": [ { "item": "earthbag", "count": 20 } ], "furn_set": "f_earthbag_half" }, + "bash": { + "str_min": 24, + "str_max": 80, + "sound": "rrrip!", + "sound_fail": "whump.", + "furn_set": "f_earthbag_half", + "items": [ { "item": "bag_canvas", "count": [ 15, 20 ] }, { "item": "material_sand", "charges": [ 50, 60 ] } ] } }, { diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index 74a31e9b8772a..ca2dd2b77c173 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -114,7 +114,7 @@ "description": "A handful of New England sand. If you had a stoked furnace, you could turn it into glass. Otherwise, it's only good for making cement.", "material": "powder", "volume": 1, - "weight": 10, + "weight": 8, "bashing": 1, "ammo_type": "components", "count": 50 @@ -1186,5 +1186,35 @@ "ammo_type": "components", "stack_size": 200, "looks_like": "bb" + }, + { + "id": "sandbag", + "type": "GENERIC", + "category": "other", + "name": "sandbag", + "description": "This is a canvas sack filled with sand. It can be used to construct simple barricades.", + "weight": 24415, + "volume": "16L", + "price": 0, + "material": [ "cotton", "powder" ], + "symbol": ")", + "color": "brown", + "ammo_type": "components", + "looks_like": "bag_canvas" + }, + { + "id": "earthbag", + "type": "GENERIC", + "category": "other", + "name": "earthbag", + "description": "This is a canvas sack filled with soil. It can be used to construct simple barricades.", + "weight": 19500, + "volume": "16L", + "price": 0, + "material": [ "cotton", "powder" ], + "symbol": ")", + "color": "brown", + "ammo_type": "components", + "looks_like": "bag_canvas" } ] diff --git a/data/json/recipes/recipe_others.json b/data/json/recipes/recipe_others.json index 0e2d3426e6ca6..285ed91db9f5c 100644 --- a/data/json/recipes/recipe_others.json +++ b/data/json/recipes/recipe_others.json @@ -4452,5 +4452,27 @@ "autolearn": true, "qualities": [ { "id": "CUT", "level": 1 } ], "components": [ [ [ "splinter", 1 ] ] ] + }, + { + "type": "recipe", + "result": "sandbag", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_MATERIALS", + "skill_used": "fabrication", + "time": 2000, + "autolearn": true, + "qualities": [ { "id": "DIG", "level": 3 } ], + "components": [ [ [ "bag_canvas", 1 ] ], [ [ "material_sand", 60 ] ] ] + }, + { + "type": "recipe", + "result": "earthbag", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_MATERIALS", + "skill_used": "fabrication", + "time": 2000, + "autolearn": true, + "qualities": [ { "id": "DIG", "level": 3 } ], + "components": [ [ [ "bag_canvas", 1 ] ], [ [ "material_soil", 3 ] ] ] } ]