Skip to content

Commit

Permalink
Merge pull request #76442 from ShnitzelX2/vehicle-grab-balance
Browse files Browse the repository at this point in the history
Follow-up to #76338: convenience balances to safer vehicle grabbing
  • Loading branch information
Maleclypse authored Sep 21, 2024
2 parents df9fe9e + b055115 commit a6e3f8c
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 48 deletions.
10 changes: 5 additions & 5 deletions data/json/items/vehicle/wheel.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
"category": "veh_parts",
"type": "WHEEL",
"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.",
"description": "A set of small wheels mounted on pivots, like you'd find on a rolling office chair.",
"weight": "1150 g",
"volume": "1250 ml",
"longest_side": "102 mm",
Expand All @@ -495,8 +495,8 @@
"id": "wheel_caster_large",
"category": "veh_parts",
"type": "WHEEL",
"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.",
"name": { "str": "set of medium casters", "str_pl": "sets of medium casters" },
"description": "A set of medium wheels mounted on pivots, like you'd find on a shopping cart.",
"weight": "2700 g",
"volume": "3150 ml",
"longest_side": "190 mm",
Expand All @@ -514,8 +514,8 @@
"id": "wheel_10",
"category": "veh_parts",
"type": "WHEEL",
"name": { "str": "set of wheels", "str_pl": "sets of wheels" },
"description": "A set of four small wheels with tough rubber tires.",
"name": { "str": "set of large casters", "str_pl": "sets of large casters" },
"description": "A set of large rubber wheels mounted on pivots, like you'd find on small industrial equipment.",
"weight": "4 kg",
"volume": "4 L",
"longest_side": "254 mm",
Expand Down
4 changes: 2 additions & 2 deletions data/json/vehicleparts/cargo.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"removal": { "skills": [ [ "mechanics", 1 ] ], "time": "5 m", "using": [ [ "vehicle_weld_removal", 1 ] ] },
"repair": { "skills": [ [ "mechanics", 1 ], [ "fabrication", 2 ] ], "time": "5 m", "using": [ [ "repair_welding_standard", 3 ] ] }
},
"flags": [ "CARGO", "OBSTACLE" ],
"flags": [ "CARGO" ],
"damage_reduction": { "all": 6 },
"variants": [ { "symbols": "o", "symbols_broken": "#" } ]
},
Expand Down Expand Up @@ -118,7 +118,7 @@
"removal": { "skills": [ [ "mechanics", 1 ] ], "time": "5 m", "using": [ [ "vehicle_weld_removal", 1 ] ] },
"repair": { "skills": [ [ "mechanics", 1 ], [ "fabrication", 2 ] ], "time": "5 m", "using": [ [ "repair_welding_standard", 3 ] ] }
},
"flags": [ "CARGO", "OBSTACLE" ],
"flags": [ "CARGO" ],
"damage_reduction": { "all": 4 },
"variants": [ { "symbols": "o", "symbols_broken": "#" } ]
},
Expand Down
76 changes: 38 additions & 38 deletions data/json/vehicleparts/wheel.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,13 @@
{
"id": "wheel_caster",
"type": "vehicle_part",
"name": { "str": "casters" },
"name": { "str": "small casters" },
"item": "wheel_caster",
"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.",
"description": "A set of small wheels mounted on pivots, like you'd find on a rolling office chair.",
"damage_modifier": 50,
"folded_volume": "1250 ml",
"breaks_into": [
Expand All @@ -381,18 +381,18 @@
"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" ],
"flags": [ "WHEEL", "NEEDS_JACKING", "STABLE" ],
"variants": [ { "symbols": "o", "symbols_broken": "x" } ]
},
{
"id": "wheel_caster_large",
"type": "vehicle_part",
"name": { "str": "large casters" },
"name": { "str": "medium 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.",
"description": "A set of medium wheels mounted on pivots, like you'd find on a shopping cart.",
"durability": 70,
"damage_modifier": 50,
"folded_volume": "3150 ml",
Expand All @@ -410,7 +410,39 @@
"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" ],
"flags": [ "WHEEL", "NEEDS_JACKING", "STABLE" ],
"variants": [ { "symbols": "o", "symbols_broken": "x" } ]
},
{
"id": "wheel_10",
"type": "vehicle_part",
"name": { "str": "large casters" },
"item": "wheel_10",
"location": "under",
"categories": [ "movement" ],
"color": "dark_gray",
"durability": 120,
"description": "A set of large rubber wheels mounted on pivots, like you'd find on small industrial equipment.",
"folded_volume": "4000 ml",
"breaks_into": [
{ "item": "steel_lump", "prob": 50 },
{ "item": "steel_chunk", "count": [ 1, 5 ] },
{ "item": "scrap", "count": [ 1, 5 ] },
{ "item": "plastic_chunk", "count": [ 1, 5 ] },
{ "item": "rubber_tire_chunk", "count": [ 0, 1 ] },
{ "item": "chunk_rubber", "count": [ 3, 12 ] },
{ "item": "shredded_rubber", "charges": [ 12, 30 ] }
],
"rolling_resistance": 29.0,
"wheel_offroad_rating": 0.7,
"wheel_terrain_modifiers": { "FLAT": [ 0, 3 ], "ROAD": [ 0, 1 ] },
"contact_area": 4,
"requirements": {
"install": { "skills": [ [ "mechanics", 1 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_2", 1 ] ] },
"removal": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_2", 1 ] ] },
"repair": { "skills": [ [ "mechanics", 2 ] ], "time": "10 m", "using": [ [ "adhesive_rubber", 1 ], [ "tire_rubber", 1 ] ] }
},
"flags": [ "WHEEL", "NEEDS_JACKING", "STABLE" ],
"variants": [ { "symbols": "o", "symbols_broken": "x" } ]
},
{
Expand Down Expand Up @@ -468,38 +500,6 @@
"damage_reduction": { "all": 10 },
"variants": [ { "symbols": "-", "symbols_broken": "X" } ]
},
{
"id": "wheel_10",
"type": "vehicle_part",
"name": { "str": "wheels" },
"item": "wheel_10",
"location": "under",
"categories": [ "movement" ],
"color": "dark_gray",
"durability": 120,
"description": "A set of 10\" wheels with tough rubber tires.",
"folded_volume": "2500 ml",
"breaks_into": [
{ "item": "steel_lump", "prob": 50 },
{ "item": "steel_chunk", "count": [ 1, 5 ] },
{ "item": "scrap", "count": [ 1, 5 ] },
{ "item": "plastic_chunk", "count": [ 1, 5 ] },
{ "item": "rubber_tire_chunk", "count": [ 0, 1 ] },
{ "item": "chunk_rubber", "count": [ 3, 12 ] },
{ "item": "shredded_rubber", "charges": [ 12, 30 ] }
],
"rolling_resistance": 29.0,
"wheel_offroad_rating": 0.7,
"wheel_terrain_modifiers": { "FLAT": [ 0, 3 ], "ROAD": [ 0, 1 ] },
"contact_area": 4,
"requirements": {
"install": { "skills": [ [ "mechanics", 1 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_2", 1 ] ] },
"removal": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_2", 1 ] ] },
"repair": { "skills": [ [ "mechanics", 2 ] ], "time": "10 m", "using": [ [ "adhesive_rubber", 1 ], [ "tire_rubber", 1 ] ] }
},
"flags": [ "WHEEL", "NEEDS_JACKING", "STABLE", "STEERABLE" ],
"variants": [ { "symbols": "o", "symbols_broken": "x" } ]
},
{
"id": "wheel_motorbike",
"type": "vehicle_part",
Expand Down
4 changes: 2 additions & 2 deletions data/json/vehicles/utility.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
{ "x": 0, "y": 0, "parts": [ "generator_7500w", "wheel_mount_light", "wheel_small" ] },
{ "x": 1, "y": 0, "parts": [ "frame#cross" ] },
{ "x": 1, "y": 0, "parts": [ { "part": "tank_small", "fuel": "gasoline" } ] },
{ "x": 1, "y": 0, "parts": [ "stowboard#horizontal_rear", "controls" ] },
{ "x": 1, "y": 0, "parts": [ "box", "controls" ] },
{ "x": 1, "y": 0, "parts": [ "wheel_mount_light", "wheel_small" ] }
],
"items": [
Expand All @@ -100,7 +100,7 @@
{ "x": 0, "y": 0, "parts": [ "generator_7500w", "wheel_mount_light", "wheel_small" ] },
{ "x": 1, "y": 0, "parts": [ "frame#cross" ] },
{ "x": 1, "y": 0, "parts": [ { "part": "tank_small", "fuel": "diesel" } ] },
{ "x": 1, "y": 0, "parts": [ "stowboard#horizontal_rear", "controls" ] },
{ "x": 1, "y": 0, "parts": [ "box", "controls" ] },
{ "x": 1, "y": 0, "parts": [ "wheel_mount_light", "wheel_small" ] }
],
"items": [
Expand Down
2 changes: 1 addition & 1 deletion src/grab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ bool game::grabbed_veh_move( const tripoint_rel_ms &dp )
valid_wheels = grabbed_vehicle->valid_wheel_config();
if( valid_wheels ) {
//check for bad push/pull angle
if( veh_has_solid && !veh_single_tile ) {
if( veh_has_solid && !veh_single_tile && grabbed_vehicle->steering_effectiveness() > 0 ) {
tileray my_dir;
my_dir.init( dp.xy().raw() );
units::angle face_delta = angle_delta( grabbed_vehicle->face.dir(), my_dir.dir() );
Expand Down

0 comments on commit a6e3f8c

Please sign in to comment.