Cleanup FRIES macro and fix UBC issues in RHS Compats (#8842)

This commit is contained in:
Björn Dahlgren 2022-05-10 03:54:42 +02:00 committed by GitHub
parent 3df0640d08
commit e0a3bd65ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 54 additions and 66 deletions

View File

@ -1,16 +1,3 @@
#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
class GVAR(equipFRIES) { \
property = QGVAR(equipFRIES); \
control = "Checkbox"; \
displayName = CSTRING(Eden_equipFRIES); \
tooltip = CSTRING(Eden_equipFRIES_Tooltip); \
expression = QUOTE(if (_value) then {[_this] call FUNC(equipFRIES)}); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = "(false)"; \
}; \
}
class CfgVehicles { class CfgVehicles {
class Logic; class Logic;
class Module_F: Logic { class Module_F: Logic {
@ -221,8 +208,10 @@ class CfgVehicles {
GVAR(friesAttachmentPoint)[] = {0.035, 2.2, -0.15}; GVAR(friesAttachmentPoint)[] = {0.035, 2.2, -0.15};
GVAR(onPrepare) = QFUNC(onPrepareCommon); GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon); GVAR(onCut) = QFUNC(onCutCommon);
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class Heli_Transport_02_base_F: Helicopter_Base_H { class Heli_Transport_02_base_F: Helicopter_Base_H {
GVAR(enabled) = 1; GVAR(enabled) = 1;
GVAR(ropeOrigins)[] = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}}; GVAR(ropeOrigins)[] = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}};
@ -254,15 +243,20 @@ class CfgVehicles {
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"}; GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantryReverse"; GVAR(friesType) = "ACE_friesGantryReverse";
GVAR(friesAttachmentPoint)[] = {-1.04, 2.5, -0.34}; GVAR(friesAttachmentPoint)[] = {-1.04, 2.5, -0.34};
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F { class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {
GVAR(enabled) = 2; GVAR(enabled) = 2;
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"}; GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantry"; GVAR(friesType) = "ACE_friesGantry";
GVAR(friesAttachmentPoint)[] = {1.07, 2.5, -0.5}; GVAR(friesAttachmentPoint)[] = {1.07, 2.5, -0.5};
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class Heli_Transport_04_base_F: Helicopter_Base_H { class Heli_Transport_04_base_F: Helicopter_Base_H {
class UserActions; class UserActions;
}; };

View File

@ -16,6 +16,7 @@
#endif #endif
#include "\z\ace\addons\main\script_macros.hpp" #include "\z\ace\addons\main\script_macros.hpp"
#include "script_macros.hpp"
#define DEFAULT_ROPE_LENGTH 34.5 #define DEFAULT_ROPE_LENGTH 34.5

View File

@ -0,0 +1,10 @@
#define EQUIP_FRIES_ATTRIBUTE class EGVAR(fastroping,equipFRIES) { \
property = QEGVAR(fastroping,equipFRIES); \
control = "Checkbox"; \
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
expression = QUOTE(if (_value) then {[_this] call EFUNC(fastroping,equipFRIES)}); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
}

View File

@ -1,16 +1,3 @@
#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
class EGVAR(fastroping,equipFRIES) { \
property = QEGVAR(fastroping,equipFRIES); \
control = "Checkbox"; \
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
}; \
}
class CfgVehicles { class CfgVehicles {
class Rubber_duck_base_F; class Rubber_duck_base_F;
class rhsgref_canoe_base: Rubber_duck_base_F { class rhsgref_canoe_base: Rubber_duck_base_F {
@ -61,8 +48,10 @@ class CfgVehicles {
}; };
class rhs_uh1h_hidf: rhs_uh1h_base { class rhs_uh1h_hidf: rhs_uh1h_base {
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class rhs_uh1h_hidf_unarmed: rhs_uh1h_hidf { class rhs_uh1h_hidf_unarmed: rhs_uh1h_hidf {
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.8, -0.27}; EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.8, -0.27};
@ -75,8 +64,10 @@ class CfgVehicles {
}; };
}; };
class Attributes: Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class rhs_uh1h_idap: rhs_uh1h_base { class rhs_uh1h_idap: rhs_uh1h_base {
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.8, -0.27}; EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.8, -0.27};
@ -89,8 +80,10 @@ class CfgVehicles {
}; };
}; };
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class rhs_uh1h_un: rhs_uh1h_base { class rhs_uh1h_un: rhs_uh1h_base {
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.8, -0.27}; EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.8, -0.27};
@ -103,8 +96,10 @@ class CfgVehicles {
}; };
}; };
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
// ACE Explosives // ACE Explosives
class Items_base_F; class Items_base_F;

View File

@ -4,3 +4,4 @@
#include "\z\ace\addons\main\script_mod.hpp" #include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp" #include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\fastroping\script_macros.hpp"

View File

@ -1,16 +1,3 @@
#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
class EGVAR(fastroping,equipFRIES) { \
property = QEGVAR(fastroping,equipFRIES); \
control = "Checkbox"; \
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
}; \
}
class CfgVehicles { class CfgVehicles {
class LandVehicle; class LandVehicle;
class Car: LandVehicle { class Car: LandVehicle {
@ -54,8 +41,10 @@ class CfgVehicles {
}; };
class RHS_UH1Y_base: RHS_UH1_Base { class RHS_UH1Y_base: RHS_UH1_Base {
class Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class RHS_UH1Y_US_base: RHS_UH1Y_base {}; class RHS_UH1Y_US_base: RHS_UH1Y_base {};
class RHS_UH1Y: RHS_UH1Y_US_base { class RHS_UH1Y: RHS_UH1Y_US_base {
EGVAR(fastroping,enabled) = 2; EGVAR(fastroping,enabled) = 2;
@ -80,8 +69,6 @@ class CfgVehicles {
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor)); condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
}; };
}; };
EQUIP_FRIES_ATTRIBUTE;
}; };
class Helicopter_Base_H: Helicopter_Base_F { class Helicopter_Base_H: Helicopter_Base_F {
@ -100,7 +87,11 @@ class CfgVehicles {
EGVAR(refuel,fuelCapacity) = 1360; EGVAR(refuel,fuelCapacity) = 1360;
}; };
class RHS_UH60M_base: RHS_UH60_Base {}; class RHS_UH60M_base: RHS_UH60_Base {
class Attributes {
EQUIP_FRIES_ATTRIBUTE;
};
};
class RHS_UH60M_US_base: RHS_UH60M_base {}; class RHS_UH60M_US_base: RHS_UH60M_base {};
class RHS_UH60M: RHS_UH60M_US_base { class RHS_UH60M: RHS_UH60M_US_base {
EGVAR(fastroping,enabled) = 2; EGVAR(fastroping,enabled) = 2;
@ -119,21 +110,29 @@ class CfgVehicles {
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor)); condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
}; };
}; };
};
class RHS_UH60M2: RHS_UH60M {};
EQUIP_FRIES_ATTRIBUTE; class RHS_UH60M_ESSS: RHS_UH60M2 {
EGVAR(fastroping,enabled) = 0;
class Attributes: Attributes {
delete EGVAR(fastroping,equipFRIES);
};
}; };
class RHS_UH60M_MEV: RHS_UH60M { class RHS_UH60M_MEV: RHS_UH60M {
EGVAR(fastroping,enabled) = 0; EGVAR(fastroping,enabled) = 0;
class Attributes { class Attributes: Attributes {
delete EGVAR(fastroping,equipFRIES); delete EGVAR(fastroping,equipFRIES);
}; };
}; };
class RHS_UH60M_MEV2: RHS_UH60M_MEV { class RHS_UH60M_MEV2: RHS_UH60M_MEV {
EGVAR(fastroping,enabled) = 2; EGVAR(fastroping,enabled) = 2;
class Attributes: Attributes {
EQUIP_FRIES_ATTRIBUTE; EQUIP_FRIES_ATTRIBUTE;
}; };
};
class Heli_Transport_02_base_F; class Heli_Transport_02_base_F;
class RHS_CH_47F_base: Heli_Transport_02_base_F { class RHS_CH_47F_base: Heli_Transport_02_base_F {

View File

@ -4,3 +4,4 @@
#include "\z\ace\addons\main\script_mod.hpp" #include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp" #include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\fastroping\script_macros.hpp"

View File

@ -1,16 +1,3 @@
#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
class EGVAR(fastroping,equipFRIES) { \
property = QEGVAR(fastroping,equipFRIES); \
control = "Checkbox"; \
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
}; \
}
class CfgVehicles { class CfgVehicles {
#include "CfgVehicles\boxes.hpp" #include "CfgVehicles\boxes.hpp"
#include "CfgVehicles\explosives.hpp" #include "CfgVehicles\explosives.hpp"