Refuel - Fix for SOG/SPE (#10049)

* Refuel - Fix SOG/SPE Compats

* fix export

* Added missing fuel sources, improved some existing hook positions

* Removed outdated todo

* Add default code if refuel isn't loaded

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
PabstMirror 2024-06-03 04:00:12 -05:00 committed by GitHub
parent 60eabda47e
commit fe9f59bed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 73 additions and 12 deletions

View File

@ -32,6 +32,16 @@ class Extended_InitPost_EventHandlers {
init = QUOTE((_this select 0) setMass 1e-12);
};
};
class Land_vn_canisterfuel_f {
class ADDON {
init = QUOTE(call (missionNamespace getVariable [ARR_2(QQEFUNC(refuel,makeJerryCan),{})]));
};
};
class Land_vn_fuelcan {
class ADDON {
init = QUOTE(call (missionNamespace getVariable [ARR_2(QQEFUNC(refuel,makeJerryCan),{})]));
};
};
class vn_bicycle_base {
class ADDON {
init = QUOTE(call FUNC(disableCookoff));

View File

@ -1,18 +1,19 @@
#define XEH_INHERITED class EventHandlers {class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};}
// fuel pumps
class Land_vn_commercial_base;
class Land_vn_fuelstation_01_pump_f: Land_vn_commercial_base {
transportFuel = 0;
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
};
class Land_vn_fuelstation_02_pump_f: Land_vn_commercial_base {
transportFuel = 0;
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
};
class Land_vn_fuelstation_feed_f: Land_vn_commercial_base {
transportFuel = 0;
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
};
@ -20,13 +21,47 @@ class Land_vn_fuelstation_feed_f: Land_vn_commercial_base {
// fuel objects
class Land_vn_building_b_base;
class Land_vn_usaf_fueltank_75_01: Land_vn_building_b_base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{0, -0.4, -0.5}};
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-2.52, -2.2, -2.05}, {2.5, 0, -1.3}};
EGVAR(refuel,fuelCargo) = 2840; // 750 * 3.785
};
class Land_vn_b_prop_fuelbladder_01: Land_vn_usaf_fueltank_75_01 {
EGVAR(refuel,hooks)[] = {{-1.75, -6.7, -1}};
EGVAR(refuel,fuelCargo) = 3785; // 1000 * 3.785
};
class Land_vn_b_prop_fuelbladder_03: Land_vn_b_prop_fuelbladder_01 {
EGVAR(refuel,hooks)[] = {{-1.55, -6.5, -1}};
};
class Land_vn_building_industrial_base;
class Land_vn_fuel_tank_stairs: Land_vn_building_industrial_base {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{0, 0.4, -1.3}, {0, -0.4, -1.3}};
EGVAR(refuel,fuelCargo) = 10000; // reference is B_Slingload_01_Fuel_F
};
class Land_vn_object_b_base;
class Land_vn_b_prop_fueldrum_01: Land_vn_object_b_base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{0, 0, 0.5}}; // reference is Land_FlexibleTank_01_F
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{0, 0, 0}};
EGVAR(refuel,fuelCargo) = 300; // reference is Land_FlexibleTank_01_F
};
class Land_vn_b_prop_fueldrum_02: Land_vn_b_prop_fueldrum_01 {
EGVAR(refuel,hooks)[] = {{0, -1.3, -0.15}, {2.3, 1.25, -0.15}};
EGVAR(refuel,fuelCargo) = 14100; // (23 + 24) * 300
};
class vn_b_ammobox_supply_07;
class vn_b_ammobox_supply_09: vn_b_ammobox_supply_07 { // just a pallet
XEH_INHERITED;
};
class vn_object_c_base_02;
class Land_vn_canisterfuel_f: vn_object_c_base_02 {
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};
class Land_vn_object_c_base;
class Land_vn_fuelcan: Land_vn_object_c_base {
XEH_INHERITED;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
EGVAR(cargo,noRename) = 1;
};

View File

@ -1,5 +1,4 @@
#include "script_component.hpp"
// ToDo: move refuel to subconfig
#include "\z\ace\addons\refuel\defines.hpp"
#include "\z\ace\addons\hearing\script_macros_hearingProtection.hpp"
@ -47,6 +46,8 @@ class CfgPatches {
};
};
class CBA_Extended_EventHandlers;
#include "ACE_CSW_Groups.hpp"
#include "ACE_Medical_Injuries.hpp"
#include "ACE_Triggers.hpp"

View File

@ -1,13 +1,11 @@
class CfgVehicles {
class SPE_Halftrack_base;
class SPE_US_M3_Halftrack_Fuel: SPE_Halftrack_base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-0.23,-2.58,-0.59}};
EGVAR(refuel,fuelCargo) = 2000;
};
class SPE_OpelBlitz_base;
class SPE_OpelBlitz_Fuel: SPE_OpelBlitz_base {
transportFuel = 0;
EGVAR(refuel,hooks)[] = {{-0.23,-2.58,-0.59}};
EGVAR(refuel,fuelCargo) = 2000;
};

View File

@ -31,7 +31,7 @@ class GVAR(positions) {
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}}},
{"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}}},
@ -87,4 +87,10 @@ class GVAR(positions) {
{"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}}}
};
pabst_yellowstone[] = { /* Yellowstone */
{"Land_fs_feed_F", {{3075,7426,0},{7060,3626,0},{7950,4060,0},{7974,4072,0}}},
{"Land_FuelStation_01_pump_F", {{4565,1953,0}}},
{"Land_FuelStation_01_pump_malevil_F", {{7072,3676,0}}},
{"Land_FuelStation_Feed_F", {{4678,3971,0},{6391,5174,0}}}
};
};

View File

@ -3,6 +3,14 @@
#include "\z\ace\addons\refuel\script_component.hpp"
{
if (!isArray (configFile >> QGVAR(positions) >> configName _x)) then {
WARNING_1("need configs on [%1]",configName _x);
};
} forEach ("true" configClasses (configFile >> "CfgWorldList"));
private _basePumps = [];
private _totalCount = 0;
private _posCount = 0;
@ -47,9 +55,12 @@ _basePumps sort true; // sort pump classes alphabetically
private _checkCount = 0;
{
_x params ["_class", "_positions"];
private _pumps = [];
{
_checkCount = _checkCount + count (_x nearObjects [_class, 30]);
_pumps append (_x nearObjects [_class, 30]);
} forEach _positions;
_pumps = _pumps arrayIntersect _pumps;
_checkCount = _checkCount + count _pumps;
} forEach _basePumps;
if (_checkCount != _totalCount) then {
_message = "WRONG COUNT " + str _checkCount;