Skip to content

Commit

Permalink
TOW Humvee variant (#36794)
Browse files Browse the repository at this point in the history
* Added vehicle

* Added vehicle to groups

* Update tests
  • Loading branch information
RarkGrames authored and ZhilkinSerg committed Jan 10, 2020
1 parent f09c223 commit 615e213
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 3 deletions.
3 changes: 2 additions & 1 deletion data/json/vehicle_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,11 @@
[ "military_cargo_truck", 1000 ],
[ "humvee", 500 ],
[ "humvee_gl", 250 ],
[ "humvee_tow", 125 ],
[ "apc", 500 ],
[ "apc-gl", 250 ],
[ "aapc-mg", 250 ],
[ "apc-gl", 125 ]
[ "aapc-gl", 125 ]
]
},
{
Expand Down
79 changes: 78 additions & 1 deletion data/json/vehicles/military.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
{
"y": 1,
"x": -1,
"parts": [ "turret_mount", { "ammo_types": [ "762_51" ], "part": "mounted_m60", "ammo": 60, "ammo_qty": [ 10, 100 ] } ]
"parts": [ "turret_mount", { "ammo_types": [ "762_51" ], "part": "mounted_m240", "ammo": 60, "ammo_qty": [ 10, 100 ] } ]
},
{ "y": 0, "x": -1, "parts": [ "hdframe_horizontal_2", "seat", "seatbelt", "hdroof" ] },
{ "y": -1, "x": -1, "parts": [ "hdframe_vertical", "hddoor" ] },
Expand Down Expand Up @@ -465,6 +465,83 @@
{ "x": -2, "y": 0, "chance": 5, "item_groups": [ "fuel_diesel" ] }
]
},
{
"id": "humvee_tow",
"type": "vehicle",
"name": "Humvee",
"blueprint": [
[ "O-++-OH" ],
[ "|H##'|H" ],
[ "t###'|H" ],
[ "|H##'|H" ],
[ "O-++-OH" ]
],
"parts": [
{ "y": 3, "x": 3, "parts": [ "hdframe_horizontal", "plating_military" ] },
{ "y": 2, "x": 3, "parts": [ "hdframe_horizontal_2", "plating_military" ] },
{ "y": 1, "x": 3, "parts": [ "hdframe_horizontal_2", "plating_military" ] },
{ "y": 0, "x": 3, "parts": [ "hdframe_horizontal_2", "plating_military" ] },
{ "y": -1, "x": 3, "parts": [ "hdframe_horizontal", "plating_military" ] },
{ "y": 3, "x": 2, "parts": [ "hdframe_ne", "hdhalfboard_ne", "plating_military" ] },
{ "y": 3, "x": 2, "parts": [ "wheel_mount_heavy_steerable", "wheel_armor" ] },
{ "y": 2, "x": 2, "parts": [ "hdframe_horizontal", "hdhalfboard_horizontal", "plating_military" ] },
{ "y": 2, "x": 2, "parts": [ "headlight_reinforced" ] },
{ "y": 1, "x": 2, "parts": [ "hdframe_horizontal", "hdhalfboard_horizontal", "plating_military" ] },
{ "y": 1, "x": 2, "parts": [ "diesel_engine_v8", "alternator_truck", "battery_car" ] },
{ "y": 0, "x": 2, "parts": [ "hdframe_horizontal", "hdhalfboard_horizontal", "plating_military" ] },
{ "y": 0, "x": 2, "parts": [ "headlight_reinforced" ] },
{ "y": -1, "x": 2, "parts": [ "hdframe_nw", "hdhalfboard_nw", "plating_military" ] },
{ "y": -1, "x": 2, "parts": [ "wheel_mount_heavy_steerable", "wheel_armor" ] },
{ "y": 3, "x": 1, "parts": [ "hdframe_vertical", "reinforced_windshield" ] },
{ "y": 2, "x": 1, "parts": [ "hdframe_horizontal", "reinforced_windshield" ] },
{ "y": 1, "x": 1, "parts": [ "hdframe_horizontal", "reinforced_windshield" ] },
{ "y": 0, "x": 1, "parts": [ "hdframe_horizontal", "reinforced_windshield", "headlight_reinforced" ] },
{ "y": -1, "x": 1, "parts": [ "hdframe_vertical", "reinforced_windshield" ] },
{ "y": 3, "x": 0, "parts": [ "hdframe_vertical", "hddoor" ] },
{ "y": 2, "x": 0, "parts": [ "hdframe_vertical_2", "hdroof", { "fuel": "diesel", "part": "tank" } ] },
{ "y": 2, "x": 0, "parts": [ "seat", "seatbelt" ] },
{ "y": 1, "x": 0, "parts": [ "hdframe_vertical_2", "box", "recharge_station", "hdroof" ] },
{ "y": 0, "x": 0, "parts": [ "hdframe_vertical_2", "hdroof", { "fuel": "diesel", "part": "tank" } ] },
{ "y": 0, "x": 0, "parts": [ "controls", "dashboard", "vehicle_clock", "horn_big" ] },
{ "y": 0, "x": 0, "parts": [ "seat", "seatbelt" ] },
{ "y": -1, "x": 0, "parts": [ "hdframe_vertical", "hddoor" ] },
{ "y": 3, "x": -1, "parts": [ "hdframe_vertical", "hddoor" ] },
{ "y": 2, "x": -1, "parts": [ "hdframe_horizontal_2", "seat", "seatbelt", "hdroof" ] },
{ "y": 1, "x": -1, "parts": [ "hdframe_horizontal_2", "aisle_horizontal", "hdroof" ] },
{
"y": 1,
"x": -1,
"parts": [ "turret_mount", { "ammo_types": [ "atgm_heat" ], "part": "tow_launcher", "ammo": 60, "ammo_qty": [ 1, 1 ] } ]
},
{ "y": 0, "x": -1, "parts": [ "hdframe_horizontal_2", "seat", "seatbelt", "hdroof" ] },
{ "y": -1, "x": -1, "parts": [ "hdframe_vertical", "hddoor" ] },
{ "y": 3, "x": -2, "parts": [ "hdframe_vertical", "hdboard_vertical", "plating_military" ] },
{ "y": 2, "x": -2, "parts": [ "hdframe_horizontal_2", "trunk", "hdroof" ] },
{ "y": 1, "x": -2, "parts": [ "hdframe_horizontal_2", "trunk", "hdroof" ] },
{ "y": 0, "x": -2, "parts": [ "hdframe_horizontal_2", "trunk", "hdroof" ] },
{ "y": -1, "x": -2, "parts": [ "hdframe_vertical", "hdboard_vertical", "plating_military" ] },
{
"y": 3,
"x": -3,
"parts": [ "hdframe_se", "hdboard_se", "plating_military", "wheel_mount_heavy", "wheel_armor" ]
},
{ "y": 2, "x": -3, "parts": [ "hdframe_horizontal", "hddoor_trunk", "plating_military" ] },
{ "y": 1, "x": -3, "parts": [ "hdframe_horizontal", "hddoor_trunk", "plating_military" ] },
{ "y": 0, "x": -3, "parts": [ "hdframe_horizontal", "hddoor_trunk", "muffler", "plating_military" ] },
{
"y": -1,
"x": -3,
"parts": [ "hdframe_sw", "hdboard_sw", "plating_military", "wheel_mount_heavy", "wheel_armor" ]
}
],
"items": [
{ "x": 0, "y": 0, "chance": 5, "items": [ "id_military" ] },
{ "x": -2, "y": 0, "chance": 5, "item_groups": [ "fuel_diesel" ] },
{ "x": -2, "y": 2, "chance": 50, "items": [ "atgm_heat" ] },
{ "x": -2, "y": 2, "chance": 50, "items": [ "atgm_heat" ] },
{ "x": -2, "y": 2, "chance": 50, "items": [ "atgm_heat" ] }
]
},
{
"id": "military_cargo_truck",
"type": "vehicle",
Expand Down
2 changes: 1 addition & 1 deletion tests/vehicle_efficiency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ TEST_CASE( "vehicle_efficiency", "[vehicle] [engine]" )
test_vehicle( "truck_swat", 5959334, 505800, 348000, 30060, 7719 );
test_vehicle( "tractor_plow", 723658, 528000, 528000, 117000, 117000 );
test_vehicle( "apc", 5801619, 1100000, 948300, 132800, 86880 );
test_vehicle( "humvee", 5501345, 607600, 341100, 25880, 9263 );
test_vehicle( "humvee", 5503245, 607600, 340900, 25880, 9263 );
test_vehicle( "road_roller", 8705726, 363400, 418100, 22990, 6996 );
test_vehicle( "golf_cart", 444630, 52460, 105500, 27250, 14200 );
}

0 comments on commit 615e213

Please sign in to comment.