Skip to content

Commit

Permalink
Implement use of E_NO_POWER_DECAY on top-tier engines/motors (catacly…
Browse files Browse the repository at this point in the history
…smbnteam#2726)

* Implement use of E_NO_POWER_DECAY on top-tier engines/motors

* Description updates per feedback

* Update vehicle_drag_test.cpp
  • Loading branch information
chaosvolt authored Apr 30, 2023
1 parent 0222563 commit e6a94df
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions data/json/items/vehicle/engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"copy-from": "engine_gasoline",
"type": "ENGINE",
"name": { "str": "1350 hp gas turbine engine" },
"description": "A gas turbine engine, usually used for military vehicles. Known for its high rate of fuel consumption.",
"description": "A gas turbine engine, usually used for military vehicles. Known for its high rate of fuel consumption, but installing multiple turbines will not affect vehicle power.",
"weight": "1130000 g",
"volume": "45 L",
"price": 96000,
Expand All @@ -291,7 +291,7 @@
"copy-from": "engine_gasoline",
"type": "ENGINE",
"name": { "str": "1900 hp gas turbine engine" },
"description": "A large gas turbine engine, usually used for military helicopters. Known for its high rate of fuel consumption.",
"description": "A large gas turbine engine, usually used for military helicopters. Known for its high rate of fuel consumption, but installing multiple turbines will not affect vehicle power.",
"weight": "1582000 g",
"volume": "63 L",
"price": 192000,
Expand All @@ -303,7 +303,7 @@
"copy-from": "engine_gasoline",
"type": "ENGINE",
"name": { "str": "6000 hp gas turbine engine" },
"description": "A massive gas turbine engine, used to power the V-22 Osprey. Known for its high rate of fuel consumption.",
"description": "A massive gas turbine engine, used to power the V-22 Osprey. Known for its high rate of fuel consumption, but installing multiple turbines will not affect vehicle power.",
"weight": "3164000 g",
"volume": "95 L",
"price": 960000,
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/vehicle/motors.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "GENERIC",
"id": "motor_enhanced",
"name": { "str": "enhanced electric motor" },
"description": "A very powerful and yet lightweight electric motor. Useful for crafting.",
"description": "A very powerful and yet lightweight electric motor. Useful for crafting, and its advanced design means it won't suffer power loss if multiple are installed on a vehicle.",
"weight": "100 kg",
"material": [ "superalloy" ],
"volume": "20 L",
Expand All @@ -30,7 +30,7 @@
"type": "GENERIC",
"id": "motor_super",
"name": { "str": "super electric motor" },
"description": "The most powerfull electric motor on the market. Useful for crafting.",
"description": "The most powerfull electric motor on the market. Useful for crafting, and its advanced design means it won't suffer power loss if multiple are installed on a vehicle.",
"weight": "125 kg",
"volume": "25 L",
"price": 80000,
Expand Down
3 changes: 2 additions & 1 deletion data/json/vehicleparts/combustion.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"fuel_options": [ "gasoline", "diesel", "lamp_oil", "jp8", "motor_oil", "avgas", "biodiesel" ],
"m2c": 60,
"//": "25% energy efficiency",
"description": "An advanced combustion engine. Burns gasoline or diesel or aviation fuel from a tank in the vehicle. Can also burn lamp oil, though somewhat less efficiently. Better power-to-weight ratio than a traditional engine, but consumes more fuel."
"extend": { "flags": [ "E_NO_POWER_DECAY" ] },
"description": "An advanced combustion engine. Burns gasoline or diesel or aviation fuel from a tank in the vehicle. Can also burn lamp oil, though somewhat less efficiently. Better power-to-weight ratio than a traditional engine but consumes more fuel, its power will not diminish even when multiple of them are installed."
},
{
"id": "diesel_engine_i6",
Expand Down
4 changes: 4 additions & 0 deletions data/json/vehicleparts/motor.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"type": "vehicle_part",
"name": { "str": "enhanced electric motor" },
"item": "motor_enhanced",
"description": "A more advanced electric motor, its power will not diminish even when multiple of them are installed.",
"durability": 200,
"power": 282000,
"energy_consumption": 300000,
Expand All @@ -132,6 +133,7 @@
{ "item": "bearing", "count": [ 20, 50 ] },
{ "item": "cable", "charges": [ 10, 15 ] }
],
"extend": { "flags": [ "E_NO_POWER_DECAY" ] },
"damage_reduction": { "all": 50 }
},
{
Expand All @@ -140,6 +142,7 @@
"type": "vehicle_part",
"name": { "str": "super electric motor" },
"item": "motor_super",
"description": "A more advanced electric motor, its power will not diminish even when multiple of them are installed.",
"durability": 400,
"power": 475000,
"energy_consumption": 500000,
Expand All @@ -157,6 +160,7 @@
{ "item": "bearing", "count": [ 25, 60 ] },
{ "item": "cable", "charges": [ 20, 30 ] }
],
"extend": { "flags": [ "E_NO_POWER_DECAY" ] },
"damage_reduction": { "all": 60 }
}
]
4 changes: 2 additions & 2 deletions tests/vehicle_drag_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ TEST_CASE( "vehicle_drag", "[vehicle] [engine]" )
test_vehicle_drag( "car", 0.294604, 2.473484, 1167.310417, 11916, 14350 );
test_vehicle_drag( "car_mini", 0.294604, 1.816015, 1285.546875, 12157, 14580 );
test_vehicle_drag( "car_sports", 0.294604, 2.547639, 1442.767500, 20848, 24904 );
test_vehicle_drag( "car_sports_atomic", 0.294604, 3.788275, 1787.798958, 23696, 24593 );
test_vehicle_drag( "car_sports_electric", 0.294604, 3.397004, 1923.776250, 23815, 24712 );
test_vehicle_drag( "car_sports_atomic", 0.294604, 3.788275, 1787.798958, 25635, 26601 );
test_vehicle_drag( "car_sports_electric", 0.294604, 3.397004, 1923.776250, 25753, 26718 );
test_vehicle_drag( "electric_car", 0.304762, 2.485556, 1173.007292, 16208, 16826 );
test_vehicle_drag( "rara_x", 0.880425, 2.267517, 1180.809267, 8353, 8670 );
test_vehicle_drag( "suv", 0.294604, 2.914201, 1178.826786, 13988, 16827 );
Expand Down

0 comments on commit e6a94df

Please sign in to comment.