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

Add support for Tanoa and Malden Fuel Pumps, Flexible Tanks and Fuel Canister #5353

Merged
merged 4 commits into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"A3_Data_F_Loadorder",
"A3_Data_F_Curator_Loadorder",
"A3_Data_F_Kart_Loadorder",
"A3_Data_F_Bootcamp_Loadorder",
"A3_Data_F_Heli_Loadorder",
"A3_Data_F_Mark_Loadorder",
"A3_Data_F_Exp_A_Loadorder",
"A3_Data_F_Exp_B_Loadorder",
"A3_Data_F_Exp_Loadorder",
"A3_Data_F_Jets_Loadorder",
"A3_Data_F_Argo_Loadorder",
"A3_Data_F_Patrol_Loadorder",

// Vanilla
"a3_3den",
"a3_3den_language",
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.70
#define REQUIRED_VERSION 1.72
#define REQUIRED_CBA_VERSION {3,3,1}

#ifdef COMPONENT_BEAUTIFIED
Expand Down
11 changes: 9 additions & 2 deletions addons/refuel/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
Expand Down Expand Up @@ -31,4 +30,12 @@ class Extended_Killed_EventHandlers {
killed = QUOTE(_this call FUNC(handleKilled));
};
};
};
};

class Extended_InitPost_EventHandlers {
class Land_CanisterFuel_F {
class ADDON {
init = QUOTE(_this call DFUNC(makeJerryCan));
};
};
};
39 changes: 34 additions & 5 deletions addons/refuel/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ class CfgVehicles {
class NonStrategic: Building {};
class HouseBase: NonStrategic {};
class House: HouseBase {};
class House_F: House {};

class House_Small_F: House_F {
class House_F: House {
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
Expand All @@ -158,6 +156,7 @@ class CfgVehicles {
};
};
};
class House_Small_F: House_F {};

class AllVehicles: All {
GVAR(flowRate) = 1;
Expand Down Expand Up @@ -480,7 +479,7 @@ class CfgVehicles {
GVAR(fuelCargo) = 10000;
};


// Vanilla fuel objects
class StorageBladder_base_F: NonStrategic {
class ACE_Actions {
class ACE_MainActions {
Expand All @@ -496,12 +495,29 @@ class CfgVehicles {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};

MACRO_REFUEL_ACTIONS
transportFuel = 0; //60k
MACRO_REFUEL_ACTIONS
GVAR(hooks)[] = {{-3.35,2.45,0.17}};
GVAR(fuelCargo) = 60000;
};

class FlexibleTank_base_F: ThingX {
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
position = "[0, 0, 0.5]";
distance = 4;
condition = "true";
};
};
};
class Land_FlexibleTank_01_F: FlexibleTank_base_F {
transportFuel = 0; //300
MACRO_REFUEL_ACTIONS
GVAR(hooks)[] = {{0, 0, 0.5}};
GVAR(fuelCargo) = 300;
};

// Vanilla buildings
class Land_Fuelstation_Feed_F: House_Small_F {
transportFuel = 0; //50k
Expand All @@ -517,6 +533,19 @@ class CfgVehicles {
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};

class Land_FuelStation_01_pump_F: House_F {
transportFuel = 0; //50k
MACRO_REFUEL_ACTIONS
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
MACRO_REFUEL_ACTIONS
GVAR(hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}};
GVAR(fuelCargo) = REFUEL_INFINITE_FUEL;
};

// Helper object for non-AllVehicles objects
class GVAR(helper): Helicopter_Base_F {
scope = 1;
Expand Down
11 changes: 11 additions & 0 deletions addons/refuel/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ private _fuelTrucks = configProperties [configFile >> "CfgVehicles", "(isClass _
};
} forEach _fuelTrucks;
#endif

#ifdef DRAW_HOOKS_POS
addMissionEventHandler ["Draw3D", {
private _target = cursorObject;
private _cfgPos = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks));
private _dynPos = _target getVariable [QGVAR(dev_hooks), []];
{
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,1,1,1], _target modelToWorldVisual _x, 1, 1, 0, format ["Hook %1", _forEachIndex]];
} forEach ([_dynPos, _cfgPos] select (_dynPos isEqualTo []));
}];
#endif
3 changes: 2 additions & 1 deletion addons/refuel/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
#define COMPONENT_BEAUTIFIED Refuel
#include "\z\ace\addons\main\script_mod.hpp"

// #define FAST_PROGRESSBARS
// #define DRAW_HOOKS_POS
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
// #define FAST_PROGRESSBARS

#ifdef DEBUG_ENABLED_REFUEL
#define DEBUG_MODE_FULL
Expand Down