mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix 3rd party air and sea vehicle fuel capacity (#4554)
* Fix fuel capacity for air vehicles * Sea vehicles as well, minor empty classes cleanup
This commit is contained in:
parent
19fe4016e5
commit
877944ddce
@ -180,18 +180,13 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class Helicopter: Air {
|
class Helicopter: Air {
|
||||||
MACRO_CONNECT_ACTIONS
|
MACRO_CONNECT_ACTIONS
|
||||||
GVAR(fuelCapacity) = 1500;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Helicopter_Base_F: Helicopter {};
|
class Helicopter_Base_F: Helicopter {};
|
||||||
|
class Helicopter_Base_H: Helicopter_Base_F {};
|
||||||
class Helicopter_Base_H: Helicopter_Base_F {
|
|
||||||
GVAR(fuelCapacity) = 3000;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Plane: Air {
|
class Plane: Air {
|
||||||
MACRO_CONNECT_ACTIONS
|
MACRO_CONNECT_ACTIONS
|
||||||
GVAR(fuelCapacity) = 2000;
|
|
||||||
GVAR(flowRate) = 16;
|
GVAR(flowRate) = 16;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -201,7 +196,6 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class Ship_F: Ship {
|
class Ship_F: Ship {
|
||||||
MACRO_CONNECT_ACTIONS
|
MACRO_CONNECT_ACTIONS
|
||||||
GVAR(fuelCapacity) = 2000;
|
|
||||||
GVAR(flowRate) = 4;
|
GVAR(flowRate) = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -373,19 +367,6 @@ class CfgVehicles {
|
|||||||
GVAR(fuelCapacity) = 830;
|
GVAR(fuelCapacity) = 830;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Heli_Attack_01_base_F: Helicopter_Base_F {
|
|
||||||
// Commanche
|
|
||||||
};
|
|
||||||
|
|
||||||
class Heli_Attack_02_base_F: Helicopter_Base_F {
|
|
||||||
// Mi-48 Kajman
|
|
||||||
};
|
|
||||||
|
|
||||||
class Heli_Light_01_base_F: Helicopter_Base_H {
|
|
||||||
// MH-6
|
|
||||||
GVAR(fuelCapacity) = 242;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Heli_Light_02_base_F: Helicopter_Base_H {
|
class Heli_Light_02_base_F: Helicopter_Base_H {
|
||||||
// Ka-60 Kasatka
|
// Ka-60 Kasatka
|
||||||
GVAR(fuelCapacity) = 1450;
|
GVAR(fuelCapacity) = 1450;
|
||||||
@ -439,11 +420,6 @@ class CfgVehicles {
|
|||||||
GVAR(fuelCapacity) = 270;
|
GVAR(fuelCapacity) = 270;
|
||||||
};
|
};
|
||||||
|
|
||||||
class UGV_01_base_F: Car_F {
|
|
||||||
// Stomper
|
|
||||||
GVAR(fuelCapacity) = 100;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Plane_Fighter_03_base_F: Plane_Base_F {
|
class Plane_Fighter_03_base_F: Plane_Base_F {
|
||||||
// L-159 ALCA
|
// L-159 ALCA
|
||||||
GVAR(fuelCapacity) = 1914;
|
GVAR(fuelCapacity) = 1914;
|
||||||
|
@ -18,8 +18,16 @@
|
|||||||
|
|
||||||
params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]];
|
params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]];
|
||||||
|
|
||||||
private _rate = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(flowRate)) * GVAR(rate);
|
private _config = configFile >> "CfgVehicles" >> typeOf _target;
|
||||||
private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(fuelCapacity));
|
|
||||||
|
private _rate = getNumber (_config >> QGVAR(flowRate)) * GVAR(rate);
|
||||||
|
private _maxFuel = getNumber (_config >> QGVAR(fuelCapacity));
|
||||||
|
|
||||||
|
// Fall back to vanilla fuelCapacity value (only air and sea vehicles don't have this defined by default by us)
|
||||||
|
// Air and sea vehicles have that value properly defined in liters, unlike ground vehicles which is is formula of (range * tested factor) - different fuel consumption system than ground vehicles
|
||||||
|
if (_maxFuel == 0) then {
|
||||||
|
_maxFuel = getNumber (_config >> "fuelCapacity");
|
||||||
|
};
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args", "_pfID"];
|
params ["_args", "_pfID"];
|
||||||
|
Loading…
Reference in New Issue
Block a user