Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refuel - Add enable setting #7613

Merged
merged 30 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bc1429d
Add enable setting
Dystopian Mar 25, 2020
48473e1
Exclude man class init
Dystopian Apr 6, 2020
5192098
Fix multiplayer terrain pump fuel sync
Dystopian Apr 8, 2020
5a9518c
Merge remote-tracking branch 'upstream/master' into refuel-no-compat
Dystopian Apr 9, 2020
8b386c3
Add terrain pumps positions
Dystopian Apr 11, 2020
980fb37
Add vanilla fuel cargo restoring before destroying
Dystopian Apr 12, 2020
9c231a3
Merge remote-tracking branch 'upstream/master' into refuel-no-compat
Dystopian Apr 22, 2020
3887085
Add Livonia positions by bux
Dystopian Apr 22, 2020
3057229
Fix terrain pumps destruction
Dystopian Apr 23, 2020
8bbdf6a
Improve settings init
Dystopian Apr 25, 2020
f842d22
Fix double settings category
Dystopian Apr 25, 2020
a3c0667
Check enabled var in public functions
Dystopian Apr 26, 2020
3875034
Fix fnc_makeSource
Dystopian Apr 26, 2020
37b9144
Handle recent CUP Terrains changes
Dystopian Oct 3, 2020
49d3fe7
Merge remote-tracking branch 'upstream/master' into refuel-no-compat
Dystopian Jan 13, 2021
c906559
Merge remote-tracking branch 'upstream/master' into refuel-no-compat
Dystopian Mar 6, 2021
0684072
Merge branch 'master' into pr/7613
johnb432 Nov 21, 2023
d8c2929
Update includes
johnb432 Nov 21, 2023
213c733
Fix issues introduced in #9133
johnb432 Nov 21, 2023
c15483c
Change warning
Dystopian Nov 21, 2023
636118e
Merge branch 'master' into pr/7613
johnb432 Mar 25, 2024
be6a7a3
Optimisations and cleanup
johnb432 Mar 25, 2024
a4cb5ba
Add init debug trace
Dystopian Mar 25, 2024
f3f8dac
compileScript in dev
LinkIsGrim Mar 26, 2024
02a186e
yoda conditions & DFUNC macro
LinkIsGrim Mar 26, 2024
bf0e594
Wait until CBA settings are ready
johnb432 Mar 26, 2024
7fbd41a
Update Chernarus 2020 and add more maps configs
Dystopian Mar 27, 2024
4992453
Remove vanilla fuel cargo restoring before destroying
Dystopian Apr 3, 2024
bf89609
Merge branch 'master' into pr/7613
johnb432 Apr 4, 2024
c040fe4
Merge branch 'master' into pr/7613
johnb432 Apr 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions addons/refuel/ACE_Refuel_Positions.hpp
LinkIsGrim marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
class GVAR(positions) {
Altis[] = { /* Altis */ {"Land_fs_feed_F", {{3757,13478,0},{4001,12592,0},{5023,14430,0},{5769,20086,0},{6199,15081,0},{6798,15561,0},{8482,18261,0},{9026,15729,0},{9206,12112,0},{11832,14156,0},{12025,15830,0},{14173,16542,0},{14221,18303,0},{15297,17566,0},{15781,17453,0},{16751,12513,0},{16875,15469,0},{17417,13937,0},{19961,11454,0},{20785,16666,0},{21231,7117,0},{23379,19799,0},{25701,21373,0}}}};
Stratis[] = { /* Stratis */ {"Land_FuelStation_Feed_F", {{2708,5788,0}}}};
VR[] = {};
Malden[] = { /* Malden 2035 */
{"Land_fs_feed_F", {{3227,6291,0},{5111,9062,0},{5504,3500,0},{6633,8807,0},{7047,7052,0}}},
{"Land_FuelStation_01_pump_malevil_F", {{7224,7772,0},{8047,4023,0}}},
{"Land_FuelStation_Feed_F", {{10063,3988,0},{11600,4477,0}}}
};
Tanoa[] = { /* Tanoa */
{"Land_fs_feed_F", {{2132,3360,0},{2452,7435,0},{3030,11316,0},{5174,8806,0},{5380,4093,0},{5594,12508,0},{7978,7419,0},{8319,9709,0},{8494,12432,0},{8954,13678,0},{8970,10332,0},{10827,6490,0},{10941,9855,0},{11146,5152,0},{11631,2999,0},{14261,11513,0},{14365,8743,0}}},
{"Land_FuelStation_01_pump_F", {{1865,12128,0},{5409,9905,0},{5682,10165,0},{5776,4222,0},{5793,10825,0},{6592,13080,0},{6887,7491,0},{7359,7998,0},{9954,13467,0},{11635,13047,0},{11694,2271,0},{12613,7583,0}}}
};
Enoch[] = { /* Livonia */
{"Land_FuelStation_03_pump_F", {{2008,7365,0},{6259,3949,0}}},
{"Land_FuelStation_Feed_F", {{10208,2173,0}}}
};

Bootcamp_ACR[] = { /* CUP Bukovina */ {"Land_A_FuelStation_Feed", {{652,473,0},{2849,1612,0}}}};
Woodland_ACR[] = { /* CUP Bystrica */ {"Land_A_FuelStation_Feed", {{447,1381,0},{1302,2185,0},{1855,6852,0},{4102,1195,0},{4755,4499,0}}}};
chernarus[] = { /* CUP Chernarus (Autumn) */ {"Land_A_FuelStation_Feed", {{2021,2242,0},{2692,5602,0},{2997,7471,0},{3648,8968,0},{4733,6381,0},{5847,2191,0},{5849,10112,0},{6705,2996,0},{7255,7662,0},{9502,2005,0},{10154,5300,0},{10446,8866,0},{10726,10786,0},{12988,10076,0},{13385,6603,0}}}};
chernarus_summer[] = { /* CUP Chernarus (Summer) */ {"Land_A_FuelStation_Feed", {{2021,2242,0},{2685,5606,0},{2998,7473,0},{3652,8973,0},{4733,6381,0},{5854,2193,0},{5849,10112,0},{6702,2995,0},{7255,7662,0},{9502,2005,0},{10154,5300,0},{10452,8869,0},{10726,10786,0},{13001,10074,0},{13398,6606,0}}}};
Chernarus_Winter[] = { /* CUP Chernarus (Winter) */ {"Land_A_FuelStation_Feed", {{2021,2242,0},{2685,5604,0},{2997,7471,0},{3657,8979,0},{4733,6381,0},{5854,2193,0},{5849,10112,0},{6702,2995,0},{7255,7662,0},{9503,2019,0},{10155,5309,0},{10452,8869,0},{10726,10786,0},{12994,10075,0},{13385,6603,0}}}};
cup_chernarus_A3[] = { /* CUP Chernarus 2020 */
{"Land_fs_feed_F", {{2511,5279,0}}},
{"Land_FuelStation_03_pump_F", {{319,9382,0},{1132,2393,0}, {2021,2242,0},{2692,5602,0},{2991,7474,0},{3007,12654,0},{3648,8968,0},{4331,13075,0},{4733,6381,0},{5847,2191,0},{5849,10112,0},{6705,2996,0},{7255,7662,0},{9502,2005,0},{10155,5309,0},{10458,8873,0},{10726,10786,0},{12988,10076,0},{13392,6605,0}}}
};
Desert_E[] = { /* CUP Desert */ };
porto[] = { /* CUP Porto */ };
ProvingGrounds_PMC[] = { /* CUP Proving Grounds */ {"Land_FuelStation_Feed_PMC", {{698,1208,0}}}};
intro[] = { /* CUP Rahmadi */ };
sara[] = { /* CUP Sahrani */
{"Land_Benzina_schnell", {{8473,9423,0},{9227,5840,0},{9433,5187,0},{10168,6423,0},{10932,9475,0},{11233,6114,0},{11756,10227,0},{12289,6833,0}}},
{"Land_Fuelstation_army", {{9568,9819,0},{19294,13879,0}}},
};
sara_dbe1[] = { /* CUP United Sahrani */
{"Land_Benzina_schnell", {{8473,9423,0},{9227,5840,0},{9433,5187,0},{10168,6423,0},{10932,9475,0},{11233,6114,0},{11756,10227,0},{12289,6833,0}}},
{"Land_Fuelstation_army", {{9568,9819,0},{19294,13879,0}}}
};
saralite[] = { /* CUP Southern Sahrani */
{"Land_Benzina_schnell", {{3593,6663,0},{4347,3080,0},{4553,2427,0},{5288,3663,0},{6052,6715,0},{6353,3354,0},{6876,7467,0},{7409,4073,0}}},
{"Land_Fuelstation_army", {{4688,7059,0}}}
};
Shapur_BAF[] = { /* CUP Shapur */ {"Land_Ind_FuelStation_Feed_EP1", {{1512,1298,0}}}};
takistan[] = { /* CUP Takistan */ {"Land_Ind_FuelStation_Feed_EP1", {{2004,11720,0},{3081,9848,0},{3549,4197,0},{5538,9284,0},{5836,5771,0},{7497,1818,0},{8248,7800,0},{10422,6328,0},{10647,11021,0}}}};
Mountains_ACR[] = { /* CUP Takistan Mountains */ {"Land_Ind_FuelStation_Feed_EP1", {{2962,4197,0},{5249,5771,0}}}};
utes[] = { /* CUP Utes */ };
zargabad[] = { /* CUP Zargabad */ {"Land_Ind_FuelStation_Feed_EP1", {{3736,2784,0},{3867,4208,0},{3871,5980,0},{5027,1906,0}}}};

pja310[] = { /* G.O.S Al Rayak */ {"Land_Ind_FuelStation_Feed_EP1", {{887,18588,0},{964,18356,0},{1196,18463,0},{1872,8754,0},{2051,8437,0},{2125,8238,0},{2240,8584,0},{2310,8566,0},{2366,3901,0},{2879,13142,0},{3880,10361,0},{4056,13261,0},{4122,13487,0},{4302,13628,0},{4475,13377,0},{4556,13742,0},{6461,3372,0},{7216,6059,0},{7228,6344,0},{7416,6099,0},{7472,6838,0},{7591,6081,0},{11650,3536,0},{14863,7292,0},{16466,18897,0},{16476,19116,0},{16642,18994,0},{16676,19199,0},{16858,10558,0},{16908,9959,0},{17120,3706,0},{17100,4375,0},{18056,4133,0},{18229,4066,0},{18235,4571,0},{18814,5010,0}}}};
australia[] = { /* Aussie Australia v5.09 */
{"Land_fs_feed_F", {{4614,16978,0},{5509,19273,0},{5487,19276,0},{5508,19330,0},{5540,19357,0},{5564,19377,0},{5623,19376,0},{5643,19352,0},{6355,17860,0},{12811,27772,0},{15837,33438,0},{16335,33436,0},{16367,33436,0},{17127,33902,0},{20754,12737,0},{20874,12793,0},{20901,12793,1},{22127,25635,0},{22127,25666,0},{22162,25712,0},{22194,25712,0},{22213,25630,0},{22315,19235,0},{22595,24757,0},{24909,13855,0},{25050,12786,0},{25071,12786,0},{26085,11260,1},{26212,11174,0},{26824,28005,0},{27719,17108,0},{27757,12033,0},{28473,35132,0},{30707,11879,0},{31091,5370,0},{31096,10918,0},{31096,10945,0},{31165,10914,0},{31165,10958,0},{31313,16763,0},{31515,9673,0},{31515,9652,0},{31758,4861,0},{32224,2736,0},{33919,13364,0},{33936,13350,0},{34789,26383,0},{35274,26021,2},{35786,12148,0},{35765,12170,0},{35835,12145,0},{35833,12188,0},{35812,12210,0},{36199,16479,0},{36399,13140,0},{36593,12065,0},{36574,13089,0},{36595,13089,0},{36597,13282,0},{38153,14544,0},{38520,18891,0},{38515,20173,0},{38535,20198,0},{38565,20198,0}}},
{"Land_FuelStation_01_pump_F", {{5495,18693,0},{32067,29608,0},{32087,29611,0},{33215,4147,0},{37293,13172,0},{37293,13193,0}}},
{"Land_FuelStation_Feed_F", {{19303,16449,0},{31064,20116,0}}}
};
};
7 changes: 2 additions & 5 deletions addons/refuel/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
#define GET_1ST_ARRAY(config) (if (isArray (config)) then {getArray (config) select 0} else {[ARR_3(0,0,0)]})

#define DEFAULT_FUELCARGO GET_NUMBER(configOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL)
#define DEFAULT_HOOKS GET_1ST_ARRAY(configOf _this >> QQGVAR(hooks))

class Cfg3DEN {
Expand All @@ -14,8 +11,8 @@ class Cfg3DEN {
tooltip = CSTRING(fuelCargo_edenDesc);
property = QGVAR(fuelCargo);
control = "EditShort";
expression = QUOTE(if (_value != DEFAULT_FUELCARGO) then {[ARR_2(_this,_value)] call DFUNC(makeSource)});
defaultValue = QUOTE(DEFAULT_FUELCARGO);
expression = QUOTE(if (_value != (_this call DFUNC(getFuelCargo))) then {[ARR_2(_this,_value)] call DFUNC(makeSource)});
defaultValue = QUOTE(_this call DFUNC(getFuelCargo));
LinkIsGrim marked this conversation as resolved.
Show resolved Hide resolved
validate = "number";
condition = "(1-objectBrain)*(1-objectAgent)";
typeName = "NUMBER";
Expand Down
36 changes: 9 additions & 27 deletions addons/refuel/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define XEH_INHERITED class EventHandlers {class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};}
johnb432 marked this conversation as resolved.
Show resolved Hide resolved

class CBA_Extended_EventHandlers;

class CfgNonAIVehicles {
Expand Down Expand Up @@ -45,9 +47,7 @@ class CfgVehicles {

class ThingX;
class GVAR(fuelNozzle): ThingX {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
XEH_INHERITED;

displayName = QGVAR(fuelNozzle);
scope = 1;
Expand Down Expand Up @@ -275,12 +275,6 @@ class CfgVehicles {
GVAR(hooks)[] = {{0.38,-3.17,-0.7},{-0.41,-3.17,-0.7}};
GVAR(fuelCargo) = 2000;
};
class C_Van_01_fuel_F: Van_01_fuel_base_F {
transportFuel = 0; //1k
};
class I_G_Van_01_fuel_F: Van_01_fuel_base_F {
transportFuel = 0; //1k
};

class Tank_F: Tank {
GVAR(fuelCapacity) = 1200;
Expand All @@ -295,7 +289,6 @@ class CfgVehicles {
class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {};

class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F {
transportFuel = 0; //3k
GVAR(hooks)[] = {{-1.08,-4.81,-0.8}};
GVAR(fuelCargo) = 1000;
};
Expand Down Expand Up @@ -407,7 +400,6 @@ class CfgVehicles {

// Vanilla fuel vehicles
class Truck_02_fuel_base_F: Truck_02_base_F {
transportFuel = 0; //3k
GVAR(hooks)[] = {{0.99,-3.47,-0.67},{-1.04,-3.47,-0.67}};
GVAR(fuelCargo) = 10000;
};
Expand All @@ -416,13 +408,11 @@ class CfgVehicles {
};

class B_Truck_01_fuel_F: B_Truck_01_mover_F {
transportFuel = 0; //3k
GVAR(hooks)[] = {{0.28,-4.99,-0.3},{-0.25,-4.99,-0.3}};
GVAR(fuelCargo) = 10000;
};

class O_Truck_03_fuel_F: Truck_03_base_F {
transportFuel = 0; //3k
GVAR(hooks)[] = {{1.3,-1.59,-0.62},{-1.16,-1.59,-0.62}};
GVAR(fuelCargo) = 10000;
};
Expand All @@ -436,20 +426,17 @@ class CfgVehicles {

class Pod_Heli_Transport_04_base_F: Slingload_base_F {};
class Land_Pod_Heli_Transport_04_fuel_F: Pod_Heli_Transport_04_base_F {
transportFuel = 0; //3k
GVAR(hooks)[] = {{-1.49,1.41,-0.3}};
GVAR(fuelCargo) = 10000;
};

class Slingload_01_Base_F: Slingload_base_F {};
class B_Slingload_01_Fuel_F: Slingload_01_Base_F {
transportFuel = 0; //3k
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
GVAR(hooks)[] = {{-1.52,1.14,-1.18}};
GVAR(fuelCargo) = 10000;
};
Expand All @@ -466,11 +453,7 @@ class CfgVehicles {
};
};
class Land_StorageBladder_01_F: StorageBladder_base_F {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};

transportFuel = 0; //60k
XEH_INHERITED;
GVAR(hooks)[] = {{-3.35,2.45,0.17}};
GVAR(fuelCargo) = 60000;
};
Expand All @@ -486,36 +469,35 @@ class CfgVehicles {
};
};
class Land_FlexibleTank_01_F: FlexibleTank_base_F {
transportFuel = 0; //300
GVAR(hooks)[] = {{0, 0, 0.5}};
GVAR(fuelCargo) = 300;
};

// Vanilla buildings
class Land_Fuelstation_Feed_F: House_Small_F {
transportFuel = 0; //50k
XEH_INHERITED;
GVAR(hooks)[] = {{0,0,-0.5}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};

class Land_fs_feed_F: House_Small_F {
transportFuel = 0; //50k
XEH_INHERITED;
GVAR(hooks)[] = {{-0.4,0.022,-0.23}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};

class Land_FuelStation_01_pump_F: House_F {
transportFuel = 0; //50k
XEH_INHERITED;
GVAR(hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};
class Land_FuelStation_01_pump_malevil_F: House_F {
transportFuel = 0; //50k
XEH_INHERITED;
GVAR(hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};
class Land_FuelStation_03_pump_F: House_F { // Enoch
transportFuel = 0; //50k
XEH_INHERITED;
GVAR(hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};
Expand Down
2 changes: 2 additions & 0 deletions addons/refuel/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ PREP(disconnect);
PREP(dropNozzle);
PREP(getCapacity);
PREP(getFuel);
PREP(getFuelCargo);
PREP(handleDamage);
PREP(handleDisconnect);
PREP(handleRespawn);
PREP(initSource);
Expand Down
87 changes: 81 additions & 6 deletions addons/refuel/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,9 +1,84 @@
#include "script_component.hpp"
if (!GVAR(enabled)) exitWith {};
johnb432 marked this conversation as resolved.
Show resolved Hide resolved

["All", "InitPost", {
Dystopian marked this conversation as resolved.
Show resolved Hide resolved
params ["_vehicle"];
if (getFuelCargo _vehicle <= 0) exitWith {};
TRACE_1("initPost",_vehicle);

if (local _vehicle) then {
_vehicle setFuelCargo 0;
LOG("initPost setFuelCargo");
};
if (-1 == _vehicle getVariable [QGVAR(HDEHID), -1]) then {
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
_vehicle setVariable [QGVAR(HDEHID), _vehicle addEventHandler ["HandleDamage", LINKFUNC(handleDamage)]];
LOG("initPost add HDEH");
};
}, true, ["Man"], true] call CBA_fnc_addClassEventHandler;

if (isServer) then {
addMissionEventHandler ["HandleDisconnect", {call FUNC(handleDisconnect)}];
};

private _cfgPositions = configFile >> QGVAR(positions) >> worldName;
if (isArray _cfgPositions) then {
{
_x params ["_class", "_positions"];
{
private _objects = _x nearObjects [_class, 30];
if (_objects isEqualTo []) then {
WARNING_3("no pumps %1 found near %2 %3",_class,worldName,_x);
} else {
{
// terrain fuel pumps don't trigger init and must setFuelCargo on each client
_x setFuelCargo 0;
if (isServer) then {
_x addEventHandler ["HandleDamage", LINKFUNC(handleDamage)];
_x setVariable [QGVAR(isTerrainPump), true];
};
} forEach _objects;
};
} forEach _positions;
} forEach getArray _cfgPositions;

// placed in editor static objects don't trigger init but synchronize fuel cargo
// placed in editor vehicles both trigger init and synchronize fuel cargo
{
if (getFuelCargo _x > 0) then {
TRACE_1("allMissionObjects",_x);
if (local _x) then {
_x setFuelCargo 0;
LOG("allMissionObjects setFuelCargo");
};
_x setVariable [QGVAR(HDEHID), _x addEventHandler ["HandleDamage", LINKFUNC(handleDamage)]];
};
} forEach allMissionObjects "";
} else {
// here are both terrain and editor static objects
WARNING_2("World %1: %2 is not configured; can load slower",worldName,QGVAR(positions));
private _halfWorldSize = worldSize / 2;
private _worldCenter = [_halfWorldSize, _halfWorldSize];
_halfWorldSize = _halfWorldSize * sqrt 2;
private _refuelMissionObjects = allMissionObjects "" select {getFuelCargo _x > 0};
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
private _baseStaticClasses = keys (uiNamespace getVariable QGVAR(cacheRefuelClassesBaseStatic));

{
{
_x setFuelCargo 0;
_x addEventHandler ["HandleDamage", LINKFUNC(handleDamage)];
if (isServer && {!(_x in _refuelMissionObjects)}) then {
_x setVariable [QGVAR(isTerrainPump), true];
};
} forEach (_worldCenter nearObjects [_x, _halfWorldSize]);
} forEach _baseStaticClasses;
};

[QGVAR(setFuelCargo), {
params ["_source", "_fuel"];
TRACE_2("setFuelCargo event",_fuel,_source);
_source setFuelCargo _fuel;
}] call CBA_fnc_addEventHandler;

[QGVAR(initSource), LINKFUNC(initSource)] call CBA_fnc_addEventHandler;

if (!hasInterface) exitWith {};
Expand Down Expand Up @@ -61,10 +136,10 @@ GVAR(actions) = [
] call EFUNC(interact_menu,createAction)
];

// init menu for config refuel vehicles
private _cacheRefuelClasses = call (uiNamespace getVariable [QGVAR(cacheRefuelClasses), {[[],[]]}]);
_cacheRefuelClasses params [["_staticClasses", [], [[]]], ["_dynamicClasses", [], [[]]]];
private _staticClasses = keys (uiNamespace getVariable QGVAR(cacheRefuelClassesStatic));
private _baseDynamicClasses = keys (uiNamespace getVariable QGVAR(cacheRefuelClassesBaseDynamic));

// init menu for config refuel vehicles
{
private _className = _x;
[_className, 0, ["ACE_MainActions"], GVAR(mainAction)] call EFUNC(interact_menu,addActionToClass);
Expand All @@ -81,15 +156,15 @@ _cacheRefuelClasses params [["_staticClasses", [], [[]]], ["_dynamicClasses", []
[_className, 0, ["ACE_MainActions", QGVAR(Refuel)], _x, true] call EFUNC(interact_menu,addActionToClass);
} forEach GVAR(actions);
TRACE_1("add menu to dynamic",_x);
} forEach _dynamicClasses;
} forEach _baseDynamicClasses;

#ifdef DRAW_HOOKS_POS
addMissionEventHandler ["Draw3D", {
private _source = cursorObject;
private _cfgPos = getArray (configOf _source >> QGVAR(hooks));
private _dynPos = _source getVariable [QGVAR(hooks), []];
private _dynPos = _source getVariable [QGVAR(hooks), _cfgPos];
{
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,1,1,1], _source modelToWorldVisual _x, 1, 1, 0, format ["Hook %1", _forEachIndex]];
} forEach ([_dynPos, _cfgPos] select (_dynPos isEqualTo []));
} forEach _dynPos;
}];
#endif
Loading