mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ACE rearm/refuel/repair actions for RHS vehicles (#4230)
* Rearm/refuel/repair support for RHS USF vehicles Particularily the HEMTT A4 family and M113 supply vehicle * Rearm/refuel/repair support for RHS AFRF vehicles Particularily the GAZ-66 and Ural family * Fixing macro formatting, updating requiredAddons for #4230 * Fix inheritance for ace_actions
This commit is contained in:
parent
f4ace648e3
commit
4080482c38
@ -1,3 +1,77 @@
|
||||
#define MACRO_REARM_TRUCK_ACTIONS \
|
||||
class ACE_Actions: ACE_Actions { \
|
||||
class ACE_MainActions: ACE_MainActions { \
|
||||
class EGVAR(rearm,TakeAmmo) { \
|
||||
displayName = ECSTRING(rearm,TakeAmmo); \
|
||||
distance = 7; \
|
||||
condition = QUOTE(_this call EFUNC(rearm,canTakeAmmo)); \
|
||||
insertChildren = QUOTE(_target call EFUNC(rearm,addRearmActions)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
icon = QPATHTOEF(rearm,ui\icon_rearm_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(rearm,StoreAmmo) { \
|
||||
displayName = ECSTRING(rearm,StoreAmmo); \
|
||||
distance = 7; \
|
||||
condition = QUOTE(_this call EFUNC(rearm,canStoreAmmo)); \
|
||||
statement = QUOTE(_this call EFUNC(rearm,storeAmmo)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(rearm,ui\icon_rearm_interact.paa); \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
||||
#define MACRO_REFUEL_ACTIONS \
|
||||
class ACE_Actions: ACE_Actions { \
|
||||
class ACE_MainActions: ACE_MainActions { \
|
||||
class EGVAR(refuel,Refuel) { \
|
||||
displayName = ECSTRING(refuel,Refuel); \
|
||||
distance = 7; \
|
||||
condition = "true"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
class EGVAR(refuel,TakeNozzle) { \
|
||||
displayName = ECSTRING(refuel,TakeNozzle); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canTakeNozzle)); \
|
||||
statement = QUOTE([ARR_3(_player,_target,objNull)] call EFUNC(refuel,TakeNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,CheckFuelCounter) { \
|
||||
displayName = ECSTRING(refuel,CheckFuelCounter); \
|
||||
condition = "true"; \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,readFuelCounter)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,CheckFuel) { \
|
||||
displayName = ECSTRING(refuel,CheckFuel); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canCheckFuel)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,checkFuel)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,Connect) { \
|
||||
displayName = ECSTRING(refuel,Connect); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canConnectNozzle)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call DEFUNC(refuel,connectNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,Return) { \
|
||||
displayName = ECSTRING(refuel,Return); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canReturnNozzle)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call DEFUNC(refuel,returnNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class Tank: LandVehicle {
|
||||
@ -12,7 +86,11 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
class Car;
|
||||
class Car: LandVehicle {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {};
|
||||
};
|
||||
};
|
||||
class Car_F: Car {
|
||||
class ViewPilot;
|
||||
class NewTurret;
|
||||
@ -274,16 +352,37 @@ class CfgVehicles {
|
||||
ace_repair_hitpointPositions[] = {{"era_1_hitpoint", {0,0,0}}};
|
||||
ace_repair_hitpointGroups[] = {{"era_1_hitpoint", {"era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint"}}};
|
||||
};
|
||||
|
||||
class Truck_F;
|
||||
class RHS_Ural_BaseTurret : Truck_F {
|
||||
|
||||
class Truck_F: Car_F {};
|
||||
class RHS_Ural_BaseTurret: Truck_F {
|
||||
EGVAR(refuel,fuelCapacity) = 360;
|
||||
};
|
||||
|
||||
class RHS_Ural_Base: RHS_Ural_BaseTurret {};
|
||||
class RHS_Ural_MSV_Base: RHS_Ural_Base {};
|
||||
class RHS_Ural_Support_MSV_Base_01: RHS_Ural_MSV_Base {};
|
||||
class RHS_Ural_Fuel_MSV_01: RHS_Ural_Support_MSV_Base_01 {
|
||||
transportFuel = 0;
|
||||
MACRO_REFUEL_ACTIONS
|
||||
EGVAR(refuel,hooks)[] = {{-0.05,-3.6,-0.45}};
|
||||
EGVAR(refuel,fuelCargo) = 10000;
|
||||
};
|
||||
|
||||
class rhs_truck : Truck_F {
|
||||
EGVAR(refuel,fuelCapacity) = 210;
|
||||
};
|
||||
|
||||
class rhs_gaz66_vmf: rhs_truck {};
|
||||
class rhs_gaz66_repair_base: rhs_gaz66_vmf {
|
||||
transportRepair = 0;
|
||||
EGVAR(repair,canRepair) = 1;
|
||||
};
|
||||
|
||||
class rhs_gaz66_ammo_base: rhs_gaz66_vmf {
|
||||
transportAmmo = 0;
|
||||
MACRO_REARM_TRUCK_ACTIONS
|
||||
};
|
||||
|
||||
class MRAP_02_base_F;
|
||||
class rhs_tigr_base : MRAP_02_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 138;
|
||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"rhs_c_weapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_2s3", "rhs_c_rva"};
|
||||
requiredAddons[] = {"ace_rearm", "ace_refuel", "ace_repair", "rhs_c_weapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_trucks", "rhs_c_2s3", "rhs_c_rva"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"};
|
||||
url = ECSTRING(main,URL);
|
||||
|
@ -11,10 +11,96 @@
|
||||
}; \
|
||||
}
|
||||
|
||||
#define MACRO_REARM_TRUCK_ACTIONS \
|
||||
class ACE_Actions: ACE_Actions { \
|
||||
class ACE_MainActions: ACE_MainActions { \
|
||||
class EGVAR(rearm,TakeAmmo) { \
|
||||
displayName = ECSTRING(rearm,TakeAmmo); \
|
||||
distance = 7; \
|
||||
condition = QUOTE(_this call EFUNC(rearm,canTakeAmmo)); \
|
||||
insertChildren = QUOTE(_target call EFUNC(rearm,addRearmActions)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
icon = QPATHTOEF(rearm,ui\icon_rearm_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(rearm,StoreAmmo) { \
|
||||
displayName = ECSTRING(rearm,StoreAmmo); \
|
||||
distance = 7; \
|
||||
condition = QUOTE(_this call EFUNC(rearm,canStoreAmmo)); \
|
||||
statement = QUOTE(_this call EFUNC(rearm,storeAmmo)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(rearm,ui\icon_rearm_interact.paa); \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
||||
#define MACRO_REFUEL_ACTIONS \
|
||||
class ACE_Actions: ACE_Actions { \
|
||||
class ACE_MainActions: ACE_MainActions { \
|
||||
class EGVAR(refuel,Refuel) { \
|
||||
displayName = ECSTRING(refuel,Refuel); \
|
||||
distance = 7; \
|
||||
condition = "true"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
class EGVAR(refuel,TakeNozzle) { \
|
||||
displayName = ECSTRING(refuel,TakeNozzle); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canTakeNozzle)); \
|
||||
statement = QUOTE([ARR_3(_player,_target,objNull)] call EFUNC(refuel,TakeNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,CheckFuelCounter) { \
|
||||
displayName = ECSTRING(refuel,CheckFuelCounter); \
|
||||
condition = "true"; \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,readFuelCounter)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,CheckFuel) { \
|
||||
displayName = ECSTRING(refuel,CheckFuel); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canCheckFuel)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,checkFuel)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,Connect) { \
|
||||
displayName = ECSTRING(refuel,Connect); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canConnectNozzle)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call DEFUNC(refuel,connectNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
class EGVAR(refuel,Return) { \
|
||||
displayName = ECSTRING(refuel,Return); \
|
||||
condition = QUOTE([ARR_2(_player,_target)] call EFUNC(refuel,canReturnNozzle)); \
|
||||
statement = QUOTE([ARR_2(_player,_target)] call DEFUNC(refuel,returnNozzle)); \
|
||||
exceptions[] = {"isNotInside"}; \
|
||||
icon = QPATHTOEF(refuel,ui\icon_refuel_interact.paa); \
|
||||
}; \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class Car: LandVehicle {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {};
|
||||
};
|
||||
};
|
||||
class Car_F: Car {};
|
||||
class Truck_F: Car_F {};
|
||||
class rhs_truck: Truck_F {};
|
||||
|
||||
class Tank: LandVehicle {
|
||||
class NewTurret;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {};
|
||||
};
|
||||
};
|
||||
class Tank_F: Tank {
|
||||
class Turrets {
|
||||
@ -191,11 +277,59 @@ class CfgVehicles {
|
||||
EGVAR(refuel,fuelCapacity) = 302;
|
||||
};
|
||||
|
||||
class Truck_01_base_F;
|
||||
class Truck_01_base_F: Truck_F {};
|
||||
class rhsusf_fmtv_base: Truck_01_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 219;
|
||||
};
|
||||
|
||||
class rhsusf_HEMTT_A4_base: Truck_01_base_F {};
|
||||
class rhsusf_M977A4_usarmy_wd: rhsusf_HEMTT_A4_base {};
|
||||
class rhsusf_M977A4_AMMO_usarmy_wd: rhsusf_M977A4_usarmy_wd {
|
||||
transportAmmo = 0;
|
||||
MACRO_REARM_TRUCK_ACTIONS
|
||||
};
|
||||
|
||||
class rhsusf_M977A4_BKIT_usarmy_wd: rhsusf_M977A4_usarmy_wd {};
|
||||
class rhsusf_M977A4_AMMO_BKIT_usarmy_wd: rhsusf_M977A4_BKIT_usarmy_wd {
|
||||
transportAmmo = 0;
|
||||
MACRO_REARM_TRUCK_ACTIONS
|
||||
};
|
||||
|
||||
class rhsusf_M977A4_BKIT_M2_usarmy_wd: rhsusf_M977A4_usarmy_wd {};
|
||||
class rhsusf_M977A4_AMMO_BKIT_M2_usarmy_wd: rhsusf_M977A4_BKIT_M2_usarmy_wd {
|
||||
transportAmmo = 0;
|
||||
MACRO_REARM_TRUCK_ACTIONS
|
||||
};
|
||||
|
||||
class rhsusf_M978A4_usarmy_wd: rhsusf_M977A4_usarmy_wd {
|
||||
transportFuel = 0;
|
||||
MACRO_REFUEL_ACTIONS
|
||||
EGVAR(refuel,hooks)[] = {{-0.44,-4.87,0}, {0.5,-4.87,0}};
|
||||
EGVAR(refuel,fuelCargo) = 10000;
|
||||
};
|
||||
|
||||
class rhsusf_M978A4_BKIT_usarmy_wd: rhsusf_M977A4_usarmy_wd {
|
||||
transportFuel = 0;
|
||||
MACRO_REFUEL_ACTIONS
|
||||
EGVAR(refuel,hooks)[] = {{-0.44,-4.87,0}, {0.5,-4.87,0}};
|
||||
EGVAR(refuel,fuelCargo) = 10000;
|
||||
};
|
||||
|
||||
class rhsusf_M977A4_REPAIR_usarmy_wd: rhsusf_M977A4_usarmy_wd {
|
||||
transportRepair = 0;
|
||||
EGVAR(repair,canRepair) = 1;
|
||||
};
|
||||
|
||||
class rhsusf_M977A4_REPAIR_BKIT_usarmy_wd: rhsusf_M977A4_BKIT_usarmy_wd {
|
||||
transportRepair = 0;
|
||||
EGVAR(repair,canRepair) = 1;
|
||||
};
|
||||
|
||||
class rhsusf_M977A4_REPAIR_BKIT_M2_usarmy_wd: rhsusf_M977A4_BKIT_M2_usarmy_wd {
|
||||
transportRepair = 0;
|
||||
EGVAR(repair,canRepair) = 1;
|
||||
};
|
||||
|
||||
class APC_Tracked_02_base_F: Tank_F {};
|
||||
class rhsusf_m113_tank_base: APC_Tracked_02_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 360;
|
||||
@ -206,6 +340,13 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class rhsusf_m113tank_base: APC_Tracked_02_base_F {};
|
||||
class rhsusf_m113_usarmy: rhsusf_m113tank_base {};
|
||||
class rhsusf_m113_usarmy_supply: rhsusf_m113_usarmy {
|
||||
transportAmmo = 0;
|
||||
MACRO_REARM_TRUCK_ACTIONS
|
||||
};
|
||||
|
||||
class APC_Tracked_03_base_F;
|
||||
class RHS_M2A2_Base: APC_Tracked_03_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 746;
|
||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_javelin", "rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"};
|
||||
requiredAddons[] = {"ace_javelin", "ace_rearm", "ace_refuel", "ace_repair", "rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_HEMTT_A4", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut"};
|
||||
url = ECSTRING(main,URL);
|
||||
|
Loading…
Reference in New Issue
Block a user