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 all 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
90 changes: 90 additions & 0 deletions addons/refuel/ACE_Refuel_Positions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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", {{313,9385,0},{1129,2400,0},{2021,2242,0},{2692,5602,0},{2991,7471,1},{3007,12654,0},{3648,8968,0},{4328,13081,0},{4733,6381,0},{5847,2191,0},{5849,10112,0},{6699,3001,0},{7255,7662,0},{7494,12662,0},{9502,2005,0},{10155,5309,0},{10452,8869,0},{10726,10786,0},{13001,10074,0},{13398,6606,0},{13569,13329,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}}}
};
Farabad[] = { /* Farabad */
{"Land_Benzina_schnell", {{592,7505,0},{804,1445,0},{3132,3129,0}}},
{"Land_fs_feed_F", {{1920,4960,0},{5052,4703,1},{9456,9277,0}}},
{"Land_FuelStation_01_pump_F", {{2378,6248,0},{7092,534,0}}},
{"Land_Ind_FuelStation_Feed_EP1", {{4788,5525,0}}}
};
IslaPera[] = { /* Isla Pera */
{"Land_fs_feed_F", {{1855,2866,0}}},
{"Land_FuelStation_01_pump_malevil_F", {{3981,2065,0},{5306,8796,0},{9236,4287,0}}}
};
VTF_Lybor[] = { /* Lybor */
{"Land_FuelStation_03_pump_F", {{3879,3823,0}}},
{"Land_FuelStation_Feed_F", {{1831,2694,0},{2175,3323,0},{3304,2981,0},{4271,3024,0}}}
};
rof_mok[] = { /* Mull of Kintyre, Scotland */
{"Land_A_FuelStation_Feed", {{12837,5124,1},{15271,17533,0},{19453,21896,0}}},
{"Land_fs_feed_F", {{7492,17369,0}}},
{"Land_Fuelstation", {{10284,18679,0}}},
{"Land_Ind_FuelStation_Feed_EP1", {{9762,16325,0}}}
};
pulau[] = { /* Pulau */
{"Land_fs_feed_F", {{2368,3128,0},{4891,7168,0},{7358,7368,0}}},
{"Land_FuelStation_Feed_F", {{5994,5789,0}}}
};
WL_Rosche[] = { /* Rosche, Germany (2.0) */
{"Land_fs_feed_F", {{693,4803,0},{12059,6700,0},{13320,14822,0}}},
{"Land_FuelStation_01_pump_F", {{447,6859,0}}},
{"Land_Ind_FuelStation_Feed_EP1", {{1437,5455,0}}}
};
Kapaulio[] = { /* Saint Kapaulio */
{"Land_fs_feed_F", {{931,7647,0},{958,6796,0},{2034,9426,0},{2563,9427,0},{3500,8110,0},{3602,6082,0},{4222,6308,0},{4561,693,0},{8077,5906,0},{8434,13145,0},{8525,17299,0},{9265,7155,0},{10527,18267,0},{12078,1846,0},{12833,6464,0},{13433,6327,0},{14084,6308,0},{14172,7786,0},{14831,4649,0},{16080,14743,0},{17356,2312,0},{18047,5254,0},{18318,5042,0}}},
{"Land_FuelStation_01_pump_malevil_F", {{18039,18139,0}}},
{"Land_FuelStation_Feed_F", {{756,12133,0},{1239,7346,0},{1726,17469,0},{3113,10070,0},{3828,8362,0},{5668,16967,0},{7435,14185,0},{7543,12107,0},{8366,6086,0},{9672,9586,0},{11749,12255,0},{12802,10022,0},{13989,3591,0},{15198,10900,0},{19063,1654,0},{19378,18517,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 FUNC(getFuelCargo))) then {[ARR_2(_this,_value)] call FUNC(makeSource)});
defaultValue = QUOTE(_this call FUNC(getFuelCargo));
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
1 change: 1 addition & 0 deletions addons/refuel/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ PREP(disconnect);
PREP(dropNozzle);
PREP(getCapacity);
PREP(getFuel);
PREP(getFuelCargo);
PREP(handleDisconnect);
PREP(handleRespawn);
PREP(initSource);
Expand Down
Loading