Merge pull request #3162 from acemod/Refuel_Fuelbladders

Refuel - Add refuel actions to fuel bladder objects
This commit is contained in:
Thomas Kooi 2016-02-04 19:57:50 +01:00
commit 508f6a16ae
2 changed files with 98 additions and 80 deletions

View File

@ -319,7 +319,7 @@ class CfgVehicles {
class Van_01_fuel_base_F: Van_01_base_F {
transportFuel = 0; //1k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{0.38,-3.17,-.7},{-0.41,-3.17,-.7}};
GVAR(hooks)[] = {{0.38,-3.17,-.7},{-0.41,-3.17,-.7}};
GVAR(fuelCargo) = 2000;
};
@ -338,7 +338,7 @@ class CfgVehicles {
class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{-1.08,-4.81,-.8}};
GVAR(hooks)[] = {{-1.08,-4.81,-.8}};
GVAR(fuelCargo) = 1000;
};
@ -460,21 +460,21 @@ class CfgVehicles {
class Truck_02_fuel_base_F: Truck_02_base_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{0.99,-3.47,-0.67},{-1.04,-3.47,-0.67}};
GVAR(hooks)[] = {{0.99,-3.47,-0.67},{-1.04,-3.47,-0.67}};
GVAR(fuelCargo) = 10000;
};
class B_Truck_01_fuel_F: B_Truck_01_mover_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{.28,-4.99,-.3},{-.25,-4.99,-.3}};
GVAR(hooks)[] = {{.28,-4.99,-.3},{-.25,-4.99,-.3}};
GVAR(fuelCargo) = 10000;
};
class O_Truck_03_fuel_F: Truck_03_base_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{1.3,-1.59,-.62},{-1.16,-1.59,-.62}};
GVAR(hooks)[] = {{1.3,-1.59,-.62},{-1.16,-1.59,-.62}};
GVAR(fuelCargo) = 10000;
};
@ -494,14 +494,14 @@ class CfgVehicles {
XEH_ENABLED;
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{0.55,3.02,-0.5},{-0.52,3.02,-0.5}};
GVAR(hooks)[] = {{0.55,3.02,-0.5},{-0.52,3.02,-0.5}};
GVAR(fuelCargo) = 10000;
};
class O_Heli_Transport_04_fuel_F: Heli_Transport_04_base_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{-1.52,1.14,-1.18}};
GVAR(hooks)[] = {{-1.52,1.14,-1.18}};
GVAR(fuelCargo) = 10000;
};
@ -509,16 +509,34 @@ class CfgVehicles {
class Land_Pod_Heli_Transport_04_fuel_F: Pod_Heli_Transport_04_base_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{-1.49,1.41,-.3}};
GVAR(hooks)[] = {{-1.49,1.41,-.3}};
GVAR(fuelCargo) = 10000;
};
class StorageBladder_base_F: NonStrategic {
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
position = "[-3.35,2.45,0.17]";
distance = 4;
condition = "true";
};
};
};
class Land_StorageBladder_01_F: StorageBladder_base_F {
XEH_ENABLED;
MACRO_REFUEL_ACTIONS
transportFuel = 0; //60k
GVAR(hooks)[] = {{-3.35,2.45,0.17}};
GVAR(fuelCargo) = 60000;
};
// Vanilla buildings
class Land_Fuelstation_Feed_F: House_Small_F {
XEH_ENABLED;
transportFuel = 0; //50k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{0,0,-0.5}};
GVAR(hooks)[] = {{0,0,-0.5}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};
@ -526,7 +544,7 @@ class CfgVehicles {
XEH_ENABLED;
transportFuel = 0; //50k
MACRO_REFUEL_ACTIONS
GVAR(hooks[]) = {{-0.4,0.022,-.23}};
GVAR(hooks)[] = {{-0.4,0.022,-.23}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};

View File

@ -34,7 +34,7 @@ if (isNull _nozzle) then { // func is called on fuel truck
};
_target setVariable [QGVAR(isConnected), true, true];
_endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> "ace_refuel_hooks");
_endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks));
if (count _endPosOffset == 2) then {
if (_unit distance (_target modelToWorld (_endPosOffset select 0)) < _unit distance (_target modelToWorld (_endPosOffset select 1))) then {
_endPosOffset = _endPosOffset select 0;