From 2b9573943fd02fc62c6be2334647518146798915 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Sat, 23 Jul 2022 15:23:15 -0700 Subject: [PATCH] Dost thou even lift: Add makeshift rope and chain lifts (#59485) * Update furniture-tools.json * Update workshop.json * Update furniture-tools.json * Update fake.json * Update construction.json * Update construction_category.json * Update construction_group.json * Update construction.json * Update construction.json Until such time as we can better check the stability of the underlying terrain, the 2x4s can represent mounting a reinforced beam between the roof supports. Adds the option to mount the rope-pulley hoist to a sufficiently sturdy wall (check_support) * Update furniture-tools.json * limit heavy lift to concrete or metal floors * Update furniture-tools.json * Update furniture-tools.json * Update terrain-mechanisms.json * Update construction.json * Update supplies.json * Update furniture-tools.json * Update construction.json * Update furniture-tools.json * Update fake.json --- data/json/construction.json | 98 ++++++++++++++++++- data/json/construction_category.json | 5 + data/json/construction_group.json | 15 +++ .../furniture-tools.json | 47 +++++++++ .../terrain-mechanisms.json | 26 ++++- data/json/itemgroups/supplies.json | 19 ++++ data/json/items/fake.json | 24 +++++ data/json/items/tool/workshop.json | 14 +++ 8 files changed, 242 insertions(+), 6 deletions(-) diff --git a/data/json/construction.json b/data/json/construction.json index cc2852d3f2b9e..11999d1b11958 100644 --- a/data/json/construction.json +++ b/data/json/construction.json @@ -1586,7 +1586,8 @@ "time": "60 m", "components": [ [ [ "rope_makeshift_30", 1 ], [ "rope_30", 1 ], [ "vine_30", 1 ] ], - [ [ "stick", 8 ], [ "stick_long", 4 ], [ "2x4", 8 ] ] + [ [ "stick", 8 ], [ "stick_long", 4 ], [ "2x4", 8 ] ], + [ [ "block_and_tackle", 1 ] ] ], "pre_note": "Can be deconstructed without tools. Must be adjacent to a palisade wall that is itself adjacent to a palisade gate in order to open said gate.", "pre_special": "check_empty", @@ -5684,6 +5685,101 @@ "pre_special": "check_empty", "post_terrain": "f_clay_oven" }, + { + "type": "construction", + "id": "constr_rope_hoist_tree", + "group": "build_rope_hoist", + "category": "TOOL", + "time": "30 s", + "required_skills": [ [ "fabrication", 0 ] ], + "components": [ [ [ "rope_30", 1 ] ] ], + "pre_flags": [ "SUPPORTS_ROOF", "TREE" ], + "post_terrain": "f_hoist_rope" + }, + { + "type": "construction", + "id": "constr_rope_hoist_ceiling", + "group": "build_rope_hoist", + "category": "TOOL", + "time": "5 m", + "required_skills": [ [ "fabrication", 1 ] ], + "qualities": [ [ { "id": "HAMMER", "level": 1 } ] ], + "components": [ [ [ "rope_30", 1 ] ], [ [ "nail", 6 ] ], [ [ "2x4", 2 ] ] ], + "pre_flags": [ "SUPPORTS_ROOF", "INDOORS" ], + "post_terrain": "f_hoist_rope" + }, + { + "type": "construction", + "id": "constr_rope_tackle_hoist_tree", + "group": "build_rope_tackle_hoist", + "category": "TOOL", + "time": "10 m", + "required_skills": [ [ "fabrication", 0 ] ], + "qualities": [ [ { "id": "HAMMER", "level": 1 } ] ], + "components": [ [ [ "rope_30", 1 ] ], [ [ "block_and_tackle", 1 ] ], [ [ "spike", 1 ] ] ], + "pre_flags": [ "SUPPORTS_ROOF", "TREE" ], + "post_terrain": "f_hoist_pulley" + }, + { + "type": "construction", + "id": "constr_rope_tackle_hoist_supported", + "group": "build_rope_tackle_hoist", + "category": "TOOL", + "time": "10 m", + "required_skills": [ [ "fabrication", 1 ] ], + "qualities": [ [ { "id": "HAMMER", "level": 1 } ] ], + "components": [ [ [ "rope_30", 1 ] ], [ [ "block_and_tackle", 1 ] ], [ [ "spike", 1 ] ], [ [ "nail", 6 ] ], [ [ "2x4", 2 ] ] ], + "pre_special": "check_support", + "post_terrain": "f_hoist_pulley" + }, + { + "type": "construction", + "id": "constr_rope_tackle_hoist_ceiling", + "group": "build_rope_tackle_hoist", + "category": "TOOL", + "time": "10 m", + "required_skills": [ [ "fabrication", 0 ] ], + "qualities": [ [ { "id": "HAMMER", "level": 1 } ] ], + "components": [ [ [ "rope_30", 1 ] ], [ [ "block_and_tackle", 1 ] ], [ [ "spike", 1 ] ] ], + "pre_flags": [ "SUPPORTS_ROOF", "INDOORS" ], + "post_terrain": "f_hoist_pulley" + }, + { + "type": "construction", + "id": "constr_chain_hoist_thconc", + "group": "build_chain_hoist", + "category": "TOOL", + "time": "30 m", + "required_skills": [ [ "fabrication", 3 ] ], + "qualities": [ [ { "id": "DRILL", "level": 2 } ], [ { "id": "WRENCH", "level": 2 } ] ], + "components": [ [ [ "chain", 1 ] ], [ [ "block_and_tackle", 1 ] ], [ [ "nuts_bolts", 2 ] ] ], + "pre_terrain": "t_thconc_floor", + "post_terrain": "f_hoist_chain" + }, + { + "type": "construction", + "id": "constr_chain_hoist_strconc", + "group": "build_chain_hoist", + "category": "TOOL", + "time": "30 m", + "required_skills": [ [ "fabrication", 3 ] ], + "qualities": [ [ { "id": "DRILL", "level": 3 } ], [ { "id": "WRENCH", "level": 2 } ] ], + "components": [ [ [ "chain", 1 ] ], [ [ "block_and_tackle", 1 ] ], [ [ "nuts_bolts", 2 ] ] ], + "pre_terrain": "t_strconc_floor", + "post_terrain": "f_hoist_chain" + }, + { + "type": "construction", + "id": "constr_chain_hoist_metal", + "group": "build_chain_hoist", + "category": "TOOL", + "time": "30 m", + "required_skills": [ [ "fabrication", 3 ] ], + "qualities": [ [ { "id": "DRILL", "level": 3 } ], [ { "id": "WRENCH", "level": 2 } ] ], + "components": [ [ [ "chain", 1 ] ], [ [ "block_and_tackle", 1 ] ], [ [ "nuts_bolts", 2 ] ] ], + "pre_terrain": "t_metal_floor", + "post_terrain": "f_hoist_chain" + }, { "type": "construction", "id": "constr_extract_sandmound", diff --git a/data/json/construction_category.json b/data/json/construction_category.json index 41995110d4cee..c72720578ae58 100644 --- a/data/json/construction_category.json +++ b/data/json/construction_category.json @@ -45,6 +45,11 @@ "id": "FARM_WOOD", "name": "Farming and Woodcutting" }, + { + "type": "construction_category", + "id": "TOOL", + "name": "Tools" + }, { "type": "construction_category", "id": "WINDOWS", diff --git a/data/json/construction_group.json b/data/json/construction_group.json index 25b3d5586ec8b..3a997b73a1da1 100644 --- a/data/json/construction_group.json +++ b/data/json/construction_group.json @@ -1608,5 +1608,20 @@ "type": "construction_group", "id": "build_clay_oven", "name": "Build Clay Oven" + }, + { + "type": "construction_group", + "id": "build_rope_hoist", + "name": "Hang Simple Rope Hoist" + }, + { + "type": "construction_group", + "id": "build_rope_tackle_hoist", + "name": "Build Rope & Tackle Hoist" + }, + { + "type": "construction_group", + "id": "build_chain_hoist", + "name": "Build Chain & Tackle Hoist" } ] diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index 5682800d3bac1..f4ae964b7626a 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -1551,5 +1551,52 @@ "sound_fail": "twang.", "items": [ { "item": "rope_30", "count": [ 1, 1 ] } ] } + }, + { + "type": "furniture", + "id": "f_hoist_rope", + "name": "rope hoist", + "description": "A loop of rope hangs here, using a sturdy horizontal support as a basic pulley. While crude, it gives you some mechanical advantage for lifting things.", + "symbol": "|", + "color": "yellow", + "move_cost_mod": 0, + "required_str": -1, + "flags": [ "TRANSPARENT", "EASY_DECONSTRUCT" ], + "examine_action": "deployed_furniture", + "deployed_item": "rope_30", + "deconstruct": { "items": [ { "item": "rope_30", "count": 1 } ] }, + "crafting_pseudo_item": "fake_lift_light" + }, + { + "type": "furniture", + "id": "f_hoist_pulley", + "name": "rope and tackle hoist", + "looks_like": "f_hoist_rope", + "description": "A loop of rope hangs here, looped through a quality tackle to give a significant mechanical advantage while lifting heavy objects.", + "symbol": "|", + "color": "white", + "move_cost_mod": 0, + "required_str": -1, + "flags": [ "TRANSPARENT" ], + "deconstruct": { + "items": [ { "item": "block_and_tackle", "count": 1 }, { "item": "rope_30", "count": 1 }, { "item": "spike", "count": 1 } ] + }, + "crafting_pseudo_item": "fake_lift_medium" + }, + { + "type": "furniture", + "id": "f_hoist_chain", + "name": "chain hoist", + "looks_like": "f_hoist_rope", + "description": "A sturdy chain and heavy tackle hang well-supported from the ceiling here, ready to lift most heavy items you could think of using mechanical advantage.", + "symbol": "|", + "color": "dark_gray", + "move_cost_mod": 1, + "required_str": -1, + "flags": [ "TRANSPARENT" ], + "deconstruct": { + "items": [ { "item": "chain", "count": 1 }, { "item": "block_and_tackle", "count": 1 }, { "item": "nuts_bolts", "count": 2 } ] + }, + "crafting_pseudo_item": "fake_lift_heavy" } ] diff --git a/data/json/furniture_and_terrain/terrain-mechanisms.json b/data/json/furniture_and_terrain/terrain-mechanisms.json index b4a9755cba0ef..38a4c511f45e6 100644 --- a/data/json/furniture_and_terrain/terrain-mechanisms.json +++ b/data/json/furniture_and_terrain/terrain-mechanisms.json @@ -154,7 +154,7 @@ { "type": "terrain", "id": "t_barndoor", - "name": "rope and pulley", + "name": "barn door pulley", "description": "A system of ropes and pulleys that allows to pull up heavy doors.", "symbol": "|", "color": "brown", @@ -170,15 +170,24 @@ "items": [ { "item": "rope_6", "count": [ 3, 4 ] }, { "item": "2x4", "count": [ 1, 4 ] }, - { "item": "splinter", "count": [ 2, 4 ] } + { "item": "splinter", "count": [ 2, 4 ] }, + { "item": "block_and_tackle", "count": [ 0, 1 ] } ] }, - "deconstruct": { "ter_set": "t_dirtfloor", "items": [ { "item": "rope_30", "count": 1 }, { "item": "2x4", "count": 8 } ] } + "deconstruct": { + "ter_set": "t_dirtfloor", + "items": [ + { "item": "rope_30", "count": 1 }, + { "item": "nuts_bolts", "count": 1 }, + { "item": "2x4", "count": 8 }, + { "item": "block_and_tackle", "count": 1 } + ] + } }, { "type": "terrain", "id": "t_palisade_pulley", - "name": "rope and pulley", + "name": "gate pulley", "description": "A system of ropes and pulleys that allows to pull up heavy doors or gates.", "symbol": "|", "color": "brown", @@ -197,7 +206,14 @@ { "item": "splinter", "count": [ 2, 4 ] } ] }, - "deconstruct": { "ter_set": "t_dirt", "items": [ { "item": "rope_makeshift_30", "count": 1 }, { "item": "2x4", "count": 8 } ] } + "deconstruct": { + "ter_set": "t_dirt", + "items": [ + { "item": "rope_makeshift_30", "count": 1 }, + { "item": "2x4", "count": 8 }, + { "item": "block_and_tackle", "count": 1 } + ] + } }, { "type": "terrain", diff --git a/data/json/itemgroups/supplies.json b/data/json/itemgroups/supplies.json index 04cc03841bbb4..0d756f5c8554f 100644 --- a/data/json/itemgroups/supplies.json +++ b/data/json/itemgroups/supplies.json @@ -12,6 +12,7 @@ [ "light_detector", 5 ], [ "amplifier", 40 ], [ "antenna", 40 ], + [ "nuts_bolts", 15 ], { "group": "ammo_any_batteries_full", "prob": 100 }, [ "cable", 60 ], [ "power_supply", 20 ], @@ -89,6 +90,7 @@ [ "fertilizer_commercial", 100 ], [ "material_quicklime", 70 ], [ "concrete", 70 ], + { "item": "nuts_bolts", "prob": 20, "charges": [ 15, 30 ], "container-item": "box_small" }, { "item": "rope_6", "prob": 10 }, { "item": "sheet_metal", "prob": 10 }, { "item": "sheet_metal_small", "prob": 10 }, @@ -110,6 +112,7 @@ "id": "hardware_trash", "type": "item_group", "items": [ + { "item": "nuts_bolts", "prob": 20, "charges": [ 1, 3 ], "container-item": "box_small" }, [ "wrapper", 50 ], [ "wrapper_foil", 5 ], [ "bottle_glass", 50 ], @@ -237,7 +240,15 @@ "//": "General purpose supplies for building / blue collar work.", "//2": "Stuff you might find in a jobsite, a hardware store, or a home workshop.", "items": [ + { "item": "nuts_bolts", "prob": 20, "charges": [ 5, 10 ], "container-item": "box_small" }, [ "concrete", 20 ], + { + "collection": [ + { "distribution": [ { "item": "rope_30", "prob": 70 }, { "item": "chain", "prob": 30 } ], "prob": 75 }, + { "item": "block_and_tackle", "prob": 100 } + ], + "prob": 15 + }, { "item": "rebar", "prob": 20, "count": [ 5, 10 ] }, { "item": "brick", "prob": 20, "count": [ 5, 10 ] }, [ "solder_wire", 20 ], @@ -486,6 +497,14 @@ "//": "General supplies to run a mechanics shop or do mechanical work", "items": [ [ "v_airjack_item", 20 ], + { + "collection": [ + { "distribution": [ { "item": "rope_30", "prob": 50 }, { "item": "chain", "prob": 50 } ], "prob": 85 }, + { "item": "block_and_tackle", "prob": 100 } + ], + "prob": 35 + }, + { "item": "nuts_bolts", "prob": 20, "charges": [ 5, 10 ], "container-item": "box_small" }, [ "jumper_cable", 15 ], [ "jumper_cable_heavy", 5 ], [ "stereo", 25 ], diff --git a/data/json/items/fake.json b/data/json/items/fake.json index 3337335e511e9..43ea108bee2fb 100644 --- a/data/json/items/fake.json +++ b/data/json/items/fake.json @@ -369,5 +369,29 @@ "symbol": "@", "color": "yellow", "flags": [ "ALLOWS_REMOTE_USE", "PSEUDO" ] + }, + { + "id": "fake_lift_light", + "copy-from": "fake_item", + "type": "TOOL", + "name": { "str": "light hoist" }, + "flags": [ "ALLOWS_REMOTE_USE", "PSEUDO" ], + "qualities": [ [ "LIFT", 2 ] ] + }, + { + "id": "fake_lift_medium", + "copy-from": "fake_item", + "type": "TOOL", + "name": { "str": "sturdy hoist" }, + "flags": [ "ALLOWS_REMOTE_USE", "PSEUDO" ], + "qualities": [ [ "LIFT", 8 ] ] + }, + { + "id": "fake_lift_heavy", + "copy-from": "fake_item", + "type": "TOOL", + "name": { "str": "heavy-duty hoist" }, + "flags": [ "ALLOWS_REMOTE_USE", "PSEUDO" ], + "qualities": [ [ "LIFT", 40 ] ] } ] diff --git a/data/json/items/tool/workshop.json b/data/json/items/tool/workshop.json index c79262e2a4afd..65f830b050b33 100644 --- a/data/json/items/tool/workshop.json +++ b/data/json/items/tool/workshop.json @@ -1601,5 +1601,19 @@ "use_action": [ "OXYTORCH" ], "flags": [ "ALLOWS_REMOTE_USE", "FIRESTARTER" ], "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "small_propane_tank", "medium_propane_tank" ] } ] + }, + { + "id": "block_and_tackle", + "type": "TOOL", + "category": "spare_parts", + "name": { "str": "block and tackle", "str_pl": "blocks and tackles" }, + "description": "A sturdy housing with a number of pulleys that can be used with a thick rope or a chain to gain mechanical advantage on a lift.", + "weight": "500 g", + "volume": "400 ml", + "price": 500, + "price_postapoc": 50, + "material": [ "steel" ], + "symbol": "&", + "color": "light_gray" } ]