ACE3/addons/rearm/CfgVehicles.hpp

246 lines
8.2 KiB
C++
Raw Normal View History

2015-08-15 16:43:13 +00:00
#define MACRO_REARM_ACTIONS \
class ACE_Actions { \
class ACE_MainActions { \
class GVAR(Rearm) { \
displayName = CSTRING(Rearm); \
2015-08-15 16:43:13 +00:00
distance = REARM_ACTION_DISTANCE; \
condition = QUOTE(_this call FUNC(canRearm)); \
statement = QUOTE(_player call FUNC(rearm)); \
2015-08-15 16:43:13 +00:00
exceptions[] = {"isNotInside"}; \
icon = PATHTOF(ui\icon_rearm_interact.paa); \
}; \
}; \
};
2015-08-15 16:43:13 +00:00
#define MACRO_REARM_TRUCK_ACTIONS \
2015-08-15 16:43:13 +00:00
class ACE_Actions : ACE_Actions { \
class ACE_MainActions : ACE_MainActions { \
class GVAR(TakeAmmo) { \
displayName = CSTRING(TakeAmmo); \
2015-08-15 16:43:13 +00:00
distance = REARM_ACTION_DISTANCE; \
condition = QUOTE(_this call FUNC(canTakeAmmo)); \
insertChildren = QUOTE(_target call FUNC(addRearmActions)); \
exceptions[] = {"isNotInside"}; \
showDisabled = 0; \
priority = 2; \
2015-08-15 16:43:13 +00:00
icon = PATHTOF(ui\icon_rearm_interact.paa); \
}; \
class GVAR(StoreAmmo) { \
displayName = CSTRING(StoreAmmo); \
distance = REARM_ACTION_DISTANCE; \
condition = QUOTE(_this call FUNC(canStoreAmmo)); \
statement = QUOTE(_this call FUNC(storeAmmo)); \
exceptions[] = {"isNotInside"}; \
icon = PATHTOF(ui\icon_rearm_interact.paa); \
2015-08-15 16:43:13 +00:00
}; \
}; \
};
2015-08-16 21:52:37 +00:00
2015-08-15 16:43:13 +00:00
class CfgVehicles {
class ACE_Module;
class ACE_moduleRearmSettings : ACE_Module {
scope = 2;
displayName = CSTRING(RearmSettings_Module_DisplayName);
icon = QUOTE(PATHTOF(ui\icon_module_rearm.paa));
category = "ACE_Logistics";
function = QFUNC(moduleRearmSettings);
2015-08-15 16:43:13 +00:00
functionPriority = 1;
isGlobal = 0;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class level {
displayName = CSTRING(RearmSettings_level_DisplayName);
description = CSTRING(RearmSettings_level_Description);
typeName = "NUMBER";
class values {
class vehicle {
name = CSTRING(RearmSettings_vehicle);
value = 0;
};
class magazine {
name = CSTRING(RearmSettings_magazine);
value = 1;
};
class caliber {
name = CSTRING(RearmSettings_caliber);
value = 2;
default = 1;
};
};
};
};
class ModuleDescription {
description = CSTRING(RearmSettings_Module_Description);
};
2015-08-15 16:43:13 +00:00
};
class LandVehicle;
class Car : LandVehicle {
MACRO_REARM_ACTIONS
};
class Tank : LandVehicle {
MACRO_REARM_ACTIONS
};
2015-08-15 16:43:13 +00:00
class StaticWeapon : LandVehicle {
MACRO_REARM_ACTIONS
};
class Air;
class Helicopter : Air {
MACRO_REARM_ACTIONS
};
class Plane : Air {
MACRO_REARM_ACTIONS
};
class Ship;
class Ship_F : Ship {
MACRO_REARM_ACTIONS
};
// Ammo Vehicles (with full inheritance for granted ACE_Actions)
2015-08-15 16:43:13 +00:00
class Car_F : Car {};
class Truck_F : Car_F {};
2015-08-15 16:43:13 +00:00
class Truck_03_base_F : Truck_F {};
class O_Truck_03_ammo_F : Truck_03_base_F {
2015-08-15 16:43:13 +00:00
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-15 16:43:13 +00:00
};
class Truck_02_base_F : Truck_F {};
class Truck_02_Ammo_base_F : Truck_02_base_F {};
class I_Truck_02_ammo_F : Truck_02_Ammo_base_F {
2015-08-15 16:43:13 +00:00
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-15 16:43:13 +00:00
};
class O_Truck_02_Ammo_F : Truck_02_Ammo_base_F {
2015-08-15 16:43:13 +00:00
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-15 16:43:13 +00:00
};
class Truck_01_base_F : Truck_F {};
class B_Truck_01_transport_F : Truck_01_base_F {};
class B_Truck_01_mover_F : B_Truck_01_transport_F {};
class B_Truck_01_ammo_F : B_Truck_01_mover_F {
2015-08-15 16:43:13 +00:00
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-15 16:43:13 +00:00
};
2015-08-16 21:52:37 +00:00
class Helicopter_Base_F : Helicopter {};
class Helicopter_Base_H : Helicopter_Base_F {};
class Heli_Transport_04_base_F : Helicopter_Base_H {};
2015-08-19 22:03:16 +00:00
class O_Heli_Transport_04_ammo_F : Heli_Transport_04_base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-19 22:03:16 +00:00
};
class Pod_Heli_Transport_04_base_F: StaticWeapon {};
class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F {
2015-08-19 22:03:16 +00:00
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-19 22:03:16 +00:00
};
class Slingload_base_F;
class Slingload_01_Base_F: Slingload_base_F {
2015-08-19 22:03:16 +00:00
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
selection = "";
distance = 10;
condition = "true";
};
};
};
class B_Slingload_01_Ammo_F : Slingload_01_Base_F {
XEH_ENABLED;
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
2015-08-19 22:03:16 +00:00
};
// Dummy Vehicles
2015-08-16 21:52:37 +00:00
class ThingX;
2015-08-19 22:03:16 +00:00
class GVAR(defaultCarriedObject) : ThingX {
XEH_ENABLED;
2015-08-19 22:03:16 +00:00
displayName = QGVAR(dummy_obj);
2015-12-22 16:54:16 +00:00
scope = 1;
scopeCurator = 1;
model = "\A3\Weapons_F\AmmoBoxes\AmmoBox_F.p3d";
EGVAR(cargo,size) = 1;
class ACE_Actions {
class ACE_MainActions {
displayName = CSTRING(PickUpAmmo);
distance = REARM_ACTION_DISTANCE;
condition = QUOTE(_this call FUNC(canTakeAmmo));
statement = QUOTE(_this call FUNC(grabAmmo));
exceptions[] = {"isNotInside"};
showDisabled = 0;
priority = 2;
icon = PATHTOF(ui\icon_rearm_interact.paa);
};
};
2015-08-19 22:03:16 +00:00
};
class GVAR(Bo_GBU12_LGB) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F\Ammo\Bomb_01_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Bo_Mk82) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F\Ammo\Bomb_02_F";
};
2015-08-19 22:03:16 +00:00
class GVAR(Bomb_04_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Bomb_04_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Bomb_03_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Missile_AA_04_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_04_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Missile_AA_03_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Missile_AGM_02_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Missile_AGM_01_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(R_230mm_fly) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
};
2015-08-19 22:03:16 +00:00
class GVAR(R_230mm_HE) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
};
2015-08-19 22:03:16 +00:00
class GVAR(M_PG_AT) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F\Ammo\Rocket_01_F";
};
2015-08-19 22:03:16 +00:00
class GVAR(Rocket_04_HE_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Rocket_03_HE_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Rocket_04_AP_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(Rocket_03_AP_F) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_F.p3d";
};
// Using wrong model
2015-08-19 22:03:16 +00:00
class GVAR(R_80mm_HE) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(R_60mm_HE) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
2015-08-19 22:03:16 +00:00
class GVAR(R_Hydra_HE) : GVAR(defaultCarriedObject) {
2015-08-16 21:52:37 +00:00
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
2015-08-15 16:43:13 +00:00
};