From de85a814b7aa4b8ad9a318ff708eb30d3dc0db8e Mon Sep 17 00:00:00 2001 From: wormingdead Date: Thu, 29 Feb 2024 14:20:56 -0800 Subject: [PATCH 1/4] Copy wheel_caster item, vehicle part, and recipe --- data/json/items/vehicle/wheel.json | 19 ++++++++++++++++++ data/json/recipes/recipe_vehicle.json | 16 +++++++++++++++ data/json/vehicleparts/wheel.json | 29 +++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) diff --git a/data/json/items/vehicle/wheel.json b/data/json/items/vehicle/wheel.json index 3e552c0654255..2319c809b1bbb 100644 --- a/data/json/items/vehicle/wheel.json +++ b/data/json/items/vehicle/wheel.json @@ -495,6 +495,25 @@ "width": 1, "melee_damage": { "bash": 6 } }, + { + "id": "wheel_caster_large", + "category": "veh_parts", + "type": "WHEEL", + "name": { "str": "set of casters", "str_pl": "sets of casters" }, + "description": "A set of casters, like you'd find on a shopping cart.", + "weight": "1500 g", + "volume": "1250 ml", + "longest_side": "102 mm", + "price": 14000, + "price_postapoc": 100, + "to_hit": -1, + "material": [ "steel", "plastic" ], + "symbol": "]", + "color": "dark_gray", + "diameter": 4, + "width": 1, + "melee_damage": { "bash": 6 } + }, { "id": "wheel_10", "category": "veh_parts", diff --git a/data/json/recipes/recipe_vehicle.json b/data/json/recipes/recipe_vehicle.json index eb39f5a559c04..bb41bfd8bd217 100644 --- a/data/json/recipes/recipe_vehicle.json +++ b/data/json/recipes/recipe_vehicle.json @@ -643,6 +643,22 @@ "qualities": [ { "id": "SCREW", "level": 1 }, { "id": "WRENCH", "level": 1 }, { "id": "SAW_M_FINE", "level": 1 } ], "components": [ [ [ "plastic_chunk", 4 ] ] ] }, + { + "result": "wheel_caster_large", + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_VEHICLE", + "skill_used": "fabrication", + "difficulty": 5, + "time": "90 m", + "autolearn": true, + "//": "20cm weld", + "using": [ [ "welding_standard", 20 ], [ "steel_tiny", 4 ], [ "plastic_molding", 1 ] ], + "proficiencies": [ { "proficiency": "prof_plasticworking" } ], + "qualities": [ { "id": "SCREW", "level": 1 }, { "id": "WRENCH", "level": 1 }, { "id": "SAW_M_FINE", "level": 1 } ], + "components": [ [ [ "plastic_chunk", 4 ] ] ] + }, { "result": "mounted_spare_tire", "type": "recipe", diff --git a/data/json/vehicleparts/wheel.json b/data/json/vehicleparts/wheel.json index f5e92b95dab25..74ccf601b9267 100644 --- a/data/json/vehicleparts/wheel.json +++ b/data/json/vehicleparts/wheel.json @@ -372,6 +372,35 @@ "flags": [ "WHEEL", "NEEDS_JACKING", "STABLE", "STEERABLE" ], "variants": [ { "symbols": "o", "symbols_broken": "x" } ] }, + { + "id": "wheel_caster_large", + "type": "vehicle_part", + "name": { "str": "casters" }, + "item": "wheel_caster_large", + "location": "under", + "categories": [ "movement" ], + "color": "dark_gray", + "durability": 70, + "description": "A set of small wheels, mounted on pivots, like the ones on a rolling office chair or grocery cart.", + "damage_modifier": 50, + "folded_volume": "1250 ml", + "breaks_into": [ + { "item": "steel_lump", "prob": 50 }, + { "item": "steel_chunk", "count": [ 1, 2 ] }, + { "item": "scrap", "count": [ 1, 2 ] } + ], + "rolling_resistance": 29.0, + "wheel_offroad_rating": 0.1, + "wheel_terrain_modifiers": { "FLAT": [ 0, 6 ], "ROAD": [ 0, 3 ] }, + "contact_area": 4, + "requirements": { + "install": { "skills": [ [ "mechanics", 0 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_1", 1 ] ] }, + "removal": { "skills": [ [ "mechanics", 0 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_1", 1 ] ] }, + "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "soldering_standard", 15 ] ] } + }, + "flags": [ "WHEEL", "NEEDS_JACKING", "STABLE", "STEERABLE" ], + "variants": [ { "symbols": "o", "symbols_broken": "x" } ] + }, { "id": "wheel_skateboard", "type": "vehicle_part", From 02081282f11925c8427148e2e99cdada48c2122d Mon Sep 17 00:00:00 2001 From: wormingdead Date: Thu, 29 Feb 2024 19:44:21 -0800 Subject: [PATCH 2/4] Change desc & values for item, recipe, and vehicle part --- data/json/items/vehicle/wheel.json | 28 +++++++++++++-------------- data/json/recipes/recipe_vehicle.json | 6 +++--- data/json/vehicleparts/wheel.json | 14 +++++++------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/data/json/items/vehicle/wheel.json b/data/json/items/vehicle/wheel.json index 2319c809b1bbb..f2f3b9149b0be 100644 --- a/data/json/items/vehicle/wheel.json +++ b/data/json/items/vehicle/wheel.json @@ -480,37 +480,37 @@ "id": "wheel_caster", "category": "veh_parts", "type": "WHEEL", - "name": { "str": "set of casters", "str_pl": "sets of casters" }, - "description": "A set of casters, like you'd find on a shopping cart.", - "weight": "1500 g", + "name": { "str": "set of small casters", "str_pl": "sets of small casters" }, + "description": "A set of small casters, like you'd find on an office chair.", + "weight": "1150 g", "volume": "1250 ml", "longest_side": "102 mm", - "price": 14000, + "price": 2400, "price_postapoc": 100, "to_hit": -1, "material": [ "steel", "plastic" ], "symbol": "]", "color": "dark_gray", - "diameter": 4, + "diameter": 2, "width": 1, - "melee_damage": { "bash": 6 } + "melee_damage": { "bash": 5 } }, { "id": "wheel_caster_large", "category": "veh_parts", "type": "WHEEL", - "name": { "str": "set of casters", "str_pl": "sets of casters" }, - "description": "A set of casters, like you'd find on a shopping cart.", - "weight": "1500 g", - "volume": "1250 ml", - "longest_side": "102 mm", - "price": 14000, - "price_postapoc": 100, + "name": { "str": "set of large casters", "str_pl": "sets of large casters" }, + "description": "A set of large casters, like you'd find on a shopping cart.", + "weight": "2700 g", + "volume": "3150 ml", + "longest_side": "190 mm", + "price": 4500, + "price_postapoc": 200, "to_hit": -1, "material": [ "steel", "plastic" ], "symbol": "]", "color": "dark_gray", - "diameter": 4, + "diameter": 6, "width": 1, "melee_damage": { "bash": 6 } }, diff --git a/data/json/recipes/recipe_vehicle.json b/data/json/recipes/recipe_vehicle.json index bb41bfd8bd217..9d094fa2c2ed7 100644 --- a/data/json/recipes/recipe_vehicle.json +++ b/data/json/recipes/recipe_vehicle.json @@ -653,11 +653,11 @@ "difficulty": 5, "time": "90 m", "autolearn": true, - "//": "20cm weld", - "using": [ [ "welding_standard", 20 ], [ "steel_tiny", 4 ], [ "plastic_molding", 1 ] ], + "//": "22cm weld", + "using": [ [ "welding_standard", 22 ], [ "steel_tiny", 5 ], [ "plastic_molding", 1 ] ], "proficiencies": [ { "proficiency": "prof_plasticworking" } ], "qualities": [ { "id": "SCREW", "level": 1 }, { "id": "WRENCH", "level": 1 }, { "id": "SAW_M_FINE", "level": 1 } ], - "components": [ [ [ "plastic_chunk", 4 ] ] ] + "components": [ [ [ "plastic_chunk", 12 ] ] ] }, { "result": "mounted_spare_tire", diff --git a/data/json/vehicleparts/wheel.json b/data/json/vehicleparts/wheel.json index 74ccf601b9267..8b8532dfad840 100644 --- a/data/json/vehicleparts/wheel.json +++ b/data/json/vehicleparts/wheel.json @@ -352,7 +352,7 @@ "categories": [ "movement" ], "color": "dark_gray", "durability": 70, - "description": "A set of small wheels, mounted on pivots, like the ones on a rolling office chair or grocery cart.", + "description": "A set of small wheels, mounted on pivots, like the ones on a rolling office chair.", "damage_modifier": 50, "folded_volume": "1250 ml", "breaks_into": [ @@ -375,24 +375,24 @@ { "id": "wheel_caster_large", "type": "vehicle_part", - "name": { "str": "casters" }, + "name": { "str": "large casters" }, "item": "wheel_caster_large", "location": "under", "categories": [ "movement" ], "color": "dark_gray", + "description": "A set of wheels, mounted on pivots, like the ones on a grocery cart.", "durability": 70, - "description": "A set of small wheels, mounted on pivots, like the ones on a rolling office chair or grocery cart.", "damage_modifier": 50, - "folded_volume": "1250 ml", + "folded_volume": "3150 ml", "breaks_into": [ { "item": "steel_lump", "prob": 50 }, { "item": "steel_chunk", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 1, 2 ] } ], - "rolling_resistance": 29.0, - "wheel_offroad_rating": 0.1, + "rolling_resistance": 14.0, + "wheel_offroad_rating": 0.4, "wheel_terrain_modifiers": { "FLAT": [ 0, 6 ], "ROAD": [ 0, 3 ] }, - "contact_area": 4, + "contact_area":12, "requirements": { "install": { "skills": [ [ "mechanics", 0 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_1", 1 ] ] }, "removal": { "skills": [ [ "mechanics", 0 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_1", 1 ] ] }, From c09347ba007081778caa18f1c36053e5bb5b4311 Mon Sep 17 00:00:00 2001 From: wormingdead Date: Thu, 29 Feb 2024 20:27:58 -0800 Subject: [PATCH 3/4] Change a few vehicles to use large casters Update a test to match --- data/json/vehicles/carts.json | 8 ++++---- tests/submap_load_test.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/json/vehicles/carts.json b/data/json/vehicles/carts.json index a2e74cbced3af..41cf290c6acc1 100644 --- a/data/json/vehicles/carts.json +++ b/data/json/vehicles/carts.json @@ -130,7 +130,7 @@ "type": "vehicle", "name": "Shopping Cart", "blueprint": [ "o" ], - "parts": [ { "x": 0, "y": 0, "parts": [ "xlframe#vertical_2", "wheel_caster", "basketlg#cart" ] } ], + "parts": [ { "x": 0, "y": 0, "parts": [ "xlframe#vertical_2", "wheel_caster_large", "basketlg#cart" ] } ], "items": [ { "x": 0, "y": 0, "chance": 35, "item_groups": [ "trash_cart" ] } ] }, { @@ -138,7 +138,7 @@ "type": "vehicle", "name": "Rolling Trash Can", "blueprint": [ [ "o" ] ], - "parts": [ { "x": 0, "y": 0, "parts": [ "xlframe", "wheel_caster", "integrated_trashcan" ] } ], + "parts": [ { "x": 0, "y": 0, "parts": [ "xlframe", "wheel_caster_large", "integrated_trashcan" ] } ], "items": [ { "x": 0, "y": 0, "chance": 20, "item_groups": [ "rolling_trash" ] }, { "x": 0, "y": 0, "chance": 20, "item_groups": [ "rolling_trash" ] }, @@ -154,7 +154,7 @@ [ "-" ] ], "parts": [ - { "x": 0, "y": 0, "parts": [ "xlframe#vertical_2", "wheel_caster", "basketlg#cart" ] }, + { "x": 0, "y": 0, "parts": [ "xlframe#vertical_2", "wheel_caster_large", "basketlg#cart" ] }, { "x": -1, "y": 0, "parts": [ "cart_handle" ] } ], "items": [ { "x": 0, "y": 0, "chance": 35, "item_groups": [ "trash_cart" ] } ] @@ -211,7 +211,7 @@ "name": "Welding Cart", "blueprint": [ "&" ], "parts": [ - { "x": 0, "y": 0, "parts": [ "xlframe#vertical_2", "wheel_caster", "small_storage_battery" ] }, + { "x": 0, "y": 0, "parts": [ "xlframe#vertical_2", "wheel_caster_large", "small_storage_battery" ] }, { "x": 0, "y": 0, "parts": [ { "part": "veh_tools_workshop", "tools": [ "welder", "soldering_iron" ] } ] } ], "items": [ { "x": 0, "y": 0, "chance": 30, "items": [ "goggles_welding" ] } ] diff --git a/tests/submap_load_test.cpp b/tests/submap_load_test.cpp index 771949351094e..0ecb1d6eeda39 100644 --- a/tests/submap_load_test.cpp +++ b/tests/submap_load_test.cpp @@ -459,9 +459,9 @@ static std::string submap_vehicle_ss( " \"ammo_pref\": \"null\"\n" " },\n" " {\n" - " \"id\": \"wheel_caster\",\n" + " \"id\": \"wheel_caster_large\",\n" " \"base\": {\n" - " \"typeid\": \"wheel_caster\",\n" + " \"typeid\": \"wheel_caster_large\",\n" " \"damaged\": 3372,\n" " \"item_tags\": [ \"VEHICLE\" ],\n" " \"relic_data\": null,\n" From 30531e8345fe065706385b0c30d517407229167b Mon Sep 17 00:00:00 2001 From: wormingdead Date: Thu, 29 Feb 2024 21:47:53 -0800 Subject: [PATCH 4/4] Autoformatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- data/json/vehicleparts/wheel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/vehicleparts/wheel.json b/data/json/vehicleparts/wheel.json index 8b8532dfad840..5102e4633bf6e 100644 --- a/data/json/vehicleparts/wheel.json +++ b/data/json/vehicleparts/wheel.json @@ -392,7 +392,7 @@ "rolling_resistance": 14.0, "wheel_offroad_rating": 0.4, "wheel_terrain_modifiers": { "FLAT": [ 0, 6 ], "ROAD": [ 0, 3 ] }, - "contact_area":12, + "contact_area": 12, "requirements": { "install": { "skills": [ [ "mechanics", 0 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_1", 1 ] ] }, "removal": { "skills": [ [ "mechanics", 0 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_1", 1 ] ] },