From cdcbeef248104ed4aa916dee3de4d156a46fb347 Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 8 Sep 2023 18:11:42 +0200 Subject: [PATCH 1/8] Use subcomponent macro (CBA 3.16.0) --- .../script_component.hpp | 6 ++---- .../compat_gm_explosives/script_component.hpp | 6 ++---- .../compat_gm_refuel/script_component.hpp | 6 ++---- .../compat_rhs_afrf3_csw/script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../compat_rhs_gref3_csw/script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 11 ++--------- .../compat_rhs_usf3_csw/script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- addons/compat_rhs_usf3/config.cpp | 2 +- .../compat_sog_trenches/script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- .../script_component.hpp | 6 ++---- addons/main/script_mod.hpp | 6 +++++- .../x/cba/addons/main/script_macros_common.hpp | 18 +++++++++++++----- 26 files changed, 65 insertions(+), 104 deletions(-) diff --git a/addons/compat_csla/compat_csla_explosives/script_component.hpp b/addons/compat_csla/compat_csla_explosives/script_component.hpp index cdcfa0c070e..174daffae7f 100644 --- a/addons/compat_csla/compat_csla_explosives/script_component.hpp +++ b/addons/compat_csla/compat_csla_explosives/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_csla\script_component.hpp" - #define SUBCOMPONENT explosives -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "\z\ace\addons\compat_csla\script_component.hpp" diff --git a/addons/compat_gm/compat_gm_explosives/script_component.hpp b/addons/compat_gm/compat_gm_explosives/script_component.hpp index f2c819d89ef..3168950cef2 100644 --- a/addons/compat_gm/compat_gm_explosives/script_component.hpp +++ b/addons/compat_gm/compat_gm_explosives/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_gm\script_component.hpp" - #define SUBCOMPONENT explosives -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "\z\ace\addons\compat_gm\script_component.hpp" diff --git a/addons/compat_gm/compat_gm_refuel/script_component.hpp b/addons/compat_gm/compat_gm_refuel/script_component.hpp index e5a1095957f..7c63a211482 100644 --- a/addons/compat_gm/compat_gm_refuel/script_component.hpp +++ b/addons/compat_gm/compat_gm_refuel/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_gm\script_component.hpp" - #define SUBCOMPONENT refuel -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Refuel +#include "\z\ace\addons\compat_gm\script_component.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp index 318b08f74f9..df63a0068ee 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" - #define SUBCOMPONENT csw -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/script_component.hpp index 7aa7c4a768b..5e2ac230a13 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" - #define SUBCOMPONENT explosives -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp index 70b51812361..1acf9dc4f56 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" - #define SUBCOMPONENT fastroping -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Fastroping +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/script_component.hpp index 2ea0f08dc61..83d91bc421d 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" - #define SUBCOMPONENT nightvision -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEUTIFIEID Night Vision +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/script_component.hpp index 4487ef20dce..705e21c3d9f 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" - #define SUBCOMPONENT refuel -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Refuel +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/script_component.hpp index 86f82ef9da4..568b4183f32 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" - #define SUBCOMPONENT scopes -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Scopes +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp index 045e7140c30..68deb3564b2 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" - #define SUBCOMPONENT csw -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons +#include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/script_component.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/script_component.hpp index c3655089bdc..fc654414c3d 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/script_component.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" - #define SUBCOMPONENT explosives -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp index 2faf389ac78..992a698006d 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" - #define SUBCOMPONENT fastroping -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Fastroping +#include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" diff --git a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/script_component.hpp b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/script_component.hpp index f587912569b..650ee57baf4 100644 --- a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/script_component.hpp +++ b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/script_component.hpp @@ -1,10 +1,3 @@ -#define COMPONENT compat_rhs_saf3 -#define COMPONENT_BEAUTIFIED RHS SAF Compatibility - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" - #define SUBCOMPONENT explosives -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "\z\ace\addons\compat_rhs_saf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp index d1138094265..172be7b7195 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT csw -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/script_component.hpp index b2b8019d857..3e99483f4aa 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT explosives -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp index fc676b170ee..fb12432d7f7 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT fastroping -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Fastroping +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/script_component.hpp index 312c8ef2af0..27214474026 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT javelin -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Javelin +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/script_component.hpp index bf614add9e0..ad8c4306065 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT nightvision -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Night Vision +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/script_component.hpp index adead3e752b..b493adfb1b1 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT refuel -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Refuel +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/script_component.hpp index 98856e550ea..8142b2e7a2b 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" - #define SUBCOMPONENT scopes -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Scopes +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/addons/compat_rhs_usf3/config.cpp b/addons/compat_rhs_usf3/config.cpp index bdfc2e1d51f..2d1b2d4a74f 100644 --- a/addons/compat_rhs_usf3/config.cpp +++ b/addons/compat_rhs_usf3/config.cpp @@ -7,10 +7,10 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"rhsusf_main_loadorder"}; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "Fyuran"}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_sog/compat_sog_trenches/script_component.hpp b/addons/compat_sog/compat_sog_trenches/script_component.hpp index 15bb9d933b3..6978e747a11 100644 --- a/addons/compat_sog/compat_sog_trenches/script_component.hpp +++ b/addons/compat_sog/compat_sog_trenches/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_sog\script_component.hpp" - #define SUBCOMPONENT trenches -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Trenches +#include "\z\ace\addons\compat_sog\script_component.hpp" diff --git a/addons/compat_sog/compat_sog_trenches_grad/script_component.hpp b/addons/compat_sog/compat_sog_trenches_grad/script_component.hpp index b7b8f3c7075..18915c122aa 100644 --- a/addons/compat_sog/compat_sog_trenches_grad/script_component.hpp +++ b/addons/compat_sog/compat_sog_trenches_grad/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_sog\script_component.hpp" - #define SUBCOMPONENT trenches_grad -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED Trenches GRAD +#include "\z\ace\addons\compat_sog\script_component.hpp" diff --git a/addons/compat_ws/compat_ws_nouniformrestrictions/script_component.hpp b/addons/compat_ws/compat_ws_nouniformrestrictions/script_component.hpp index 3112761bd23..8b96ee04bd7 100644 --- a/addons/compat_ws/compat_ws_nouniformrestrictions/script_component.hpp +++ b/addons/compat_ws/compat_ws_nouniformrestrictions/script_component.hpp @@ -1,5 +1,3 @@ -#include "\z\ace\addons\compat_ws\script_component.hpp" - #define SUBCOMPONENT nouniformrestrictions -#undef ADDON -#define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#define SUBCOMPONENT_BEAUTIFIED No Uniform Restrictions +#include "\z\ace\addons\compat_ws\script_component.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 5379ca4a50c..542a4a47135 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -14,7 +14,11 @@ #define REQUIRED_CBA_VERSION {3,15,7} #ifdef COMPONENT_BEAUTIFIED - #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) + #ifdef SUBCOMPONENT_BEAUTIFIED + #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED - SUBCOMPONENT_BEAUTIFIED) + #else + #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) + #endif #else #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT) #endif diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index be13021c042..7aa5b7de2e9 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -15,11 +15,11 @@ - Provide a solid structure that can be dynamic and easy editable (Which sometimes means we cannot adhere to Aim #1 ;-) An example is the path that is built from defines. Some available in this file, others in mods and addons. - Follows Standard: - Object variables: PREFIX_COMPONENT + Follows Standard: + Object variables: PREFIX_COMPONENT (or PREFIX_COMPONENT_SUBCOMPONENT) Main-object variables: PREFIX_main - Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf - e.g: x\six\addons\sys_menu\fDate.sqf + Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf (or MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SUBCOMPONENT\SCRIPTNAME.sqf) + e.g: x\six\addons\sys_menu\fDate.sqf (or x\six\addons\sys_menu\compat\fDate.sqf) Usage: define PREFIX and COMPONENT, then include this file @@ -29,6 +29,9 @@ and include your mod's script_macros.hpp In your scripts you can then include the addon's component.hpp with relative path) + use in subcomponents (subconfigs) + define SUBCOMPONENT and include parent component's script_component.hpp + TODO: - Try only to use 1 string type " vs ' - Evaluate double functions, and simplification @@ -51,9 +54,14 @@ #define MAINLOGIC main #endif -#define ADDON DOUBLES(PREFIX,COMPONENT) #define MAIN_ADDON DOUBLES(PREFIX,main) +#ifdef SUBCOMPONENT + #define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) +#else + #define ADDON DOUBLES(PREFIX,COMPONENT) +#endif + /* ------------------------------------------- Macro: VERSION_CONFIG Define CBA Versioning System config entries. From 14e048c4812cf9449a4f2ea10fce04c77b0a04a1 Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 8 Sep 2023 18:28:06 +0200 Subject: [PATCH 2/8] Streamline all subconfig CfgPatches --- addons/compat_gm/compat_gm_explosives/config.cpp | 7 ++++++- addons/compat_gm/compat_gm_refuel/config.cpp | 7 ++++++- addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp | 4 ++-- .../compat_rhs_afrf3_explosives/config.cpp | 4 ++-- .../compat_rhs_afrf3_fastroping/config.cpp | 3 ++- .../compat_rhs_afrf3_nightvision/config.cpp | 4 ++-- addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp | 4 ++-- addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp | 4 ++-- addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp | 3 ++- .../compat_rhs_gref3_explosives/config.cpp | 3 ++- .../compat_rhs_gref3_fastroping/config.cpp | 3 ++- .../compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp | 4 ++-- addons/compat_rhs_saf3/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp | 7 ++++++- .../compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp | 7 ++++++- .../compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp | 3 ++- addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp | 7 ++++++- .../compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp | 7 ++++++- addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp | 7 ++++++- addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp | 7 ++++++- 20 files changed, 71 insertions(+), 26 deletions(-) diff --git a/addons/compat_gm/compat_gm_explosives/config.cpp b/addons/compat_gm/compat_gm_explosives/config.cpp index aa3de76d41a..1f109217bae 100644 --- a/addons/compat_gm/compat_gm_explosives/config.cpp +++ b/addons/compat_gm/compat_gm_explosives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_explosives" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_gm/compat_gm_refuel/config.cpp b/addons/compat_gm/compat_gm_refuel/config.cpp index 9f367e99f93..bd98e252ead 100644 --- a/addons/compat_gm/compat_gm_refuel/config.cpp +++ b/addons/compat_gm/compat_gm_refuel/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_refuel" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp index 71ddf3b4787..7ab5db1f783 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {QGVAR(2b14_carry), QGVAR(nsv_carry), QGVAR(kord_carry), QGVAR(ags30_carry), QGVAR(spg9_carry), QGVAR(spg9m_carry), QGVAR(metis_carry), QGVAR(kornet_carry)}; requiredVersion = REQUIRED_VERSION; @@ -13,10 +13,10 @@ class CfgPatches { "rhs_main_loadorder", "ace_csw" }; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp index 9e767987da4..3de68b6b5a8 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -10,10 +10,10 @@ class CfgPatches { "rhs_main_loadorder", "ace_explosives" }; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp index d47b787f320..f91aca81ee1 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -15,6 +15,7 @@ class CfgPatches { }; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); + authors[] = {}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp index 3950c7890e2..14459aada32 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -10,10 +10,10 @@ class CfgPatches { "rhs_main_loadorder", "ace_nightvision" }; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp index 328d049bead..1b6ac9471b3 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -10,10 +10,10 @@ class CfgPatches { "rhs_main_loadorder", "ace_refuel" }; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp index ce2272766d6..bd31d036bbe 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -10,10 +10,10 @@ class CfgPatches { "rhs_main_loadorder", "ace_scopes" }; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp index 975dd19825b..3c2eca298cf 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {QGVAR(dshkm_carry)}; requiredVersion = REQUIRED_VERSION; @@ -15,6 +15,7 @@ class CfgPatches { }; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); + authors[] = {}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp index 5c646c42b44..ea39fbccc4c 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -12,6 +12,7 @@ class CfgPatches { }; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); + authors[] = {}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp index 19c4d2f612c..45cace6afff 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -15,6 +15,7 @@ class CfgPatches { }; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); + authors[] = {}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp index 45d4945c5a7..e70260b56a5 100644 --- a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp +++ b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -10,10 +10,10 @@ class CfgPatches { "rhssaf_main_loadorder", "ace_explosives" }; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_saf3/config.cpp b/addons/compat_rhs_saf3/config.cpp index e6b708dcbb7..75ee4f55307 100644 --- a/addons/compat_rhs_saf3/config.cpp +++ b/addons/compat_rhs_saf3/config.cpp @@ -7,10 +7,10 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"rhssaf_main_loadorder"}; + skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {}; url = ECSTRING(main,URL); - skipWhenMissingDependencies = 1; VERSION_CONFIG; }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp index 9bd4ef913ad..19139f5b005 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {QGVAR(m252_carry), QGVAR(m2_carry), QGVAR(mk19_carry), QGVAR(tow_carry)}; requiredVersion = REQUIRED_VERSION; @@ -14,7 +14,12 @@ class CfgPatches { "ace_csw" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp index 3ac788a89db..528993267f2 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_explosives" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp index 345f70a1e7f..311807de872 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { class ADDON { - name = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -15,6 +15,7 @@ class CfgPatches { }; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); + authors[] = {}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp index c5c581c01f6..2e20a210f85 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_javelin" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp index dcbdc49509f..643969bcf77 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_nightvision" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp index b336b89cc6f..d32d7a79c33 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_refuel" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp index 7c7a65b79eb..832e01fe4a1 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - addonRootClass = QUOTE(COMPONENT); + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; @@ -11,7 +11,12 @@ class CfgPatches { "ace_scopes" }; skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; From 66d9f1cd1e2b307a4e6d849e0521c0b5602a6e39 Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 8 Sep 2023 19:28:56 +0200 Subject: [PATCH 3/8] Use SUBADDON --- .../compat_csla/compat_csla_explosives/config.cpp | 2 +- addons/compat_gm/compat_gm_explosives/config.cpp | 2 +- addons/compat_gm/compat_gm_refuel/config.cpp | 2 +- .../compat_rhs_afrf3_csw/config.cpp | 2 +- .../compat_rhs_afrf3_explosives/config.cpp | 2 +- .../compat_rhs_afrf3_fastroping/config.cpp | 2 +- .../compat_rhs_afrf3_nightvision/config.cpp | 2 +- .../compat_rhs_afrf3_refuel/config.cpp | 2 +- .../compat_rhs_afrf3_scopes/config.cpp | 2 +- .../compat_rhs_gref3_csw/config.cpp | 2 +- .../compat_rhs_gref3_explosives/config.cpp | 2 +- .../compat_rhs_gref3_fastroping/config.cpp | 2 +- .../compat_rhs_saf3_explosives/config.cpp | 2 +- .../compat_rhs_usf3_csw/config.cpp | 2 +- .../compat_rhs_usf3_explosives/config.cpp | 2 +- .../compat_rhs_usf3_fastroping/config.cpp | 2 +- .../compat_rhs_usf3_javelin/config.cpp | 2 +- .../compat_rhs_usf3_nightvision/config.cpp | 2 +- .../compat_rhs_usf3_refuel/config.cpp | 2 +- .../compat_rhs_usf3_scopes/config.cpp | 2 +- addons/compat_sog/compat_sog_trenches/config.cpp | 6 ++---- .../compat_sog_trenches_grad/config.cpp | 6 ++---- .../compat_ws_nouniformrestrictions/config.cpp | 2 +- .../x/cba/addons/main/script_macros_common.hpp | 15 +++++++++------ 24 files changed, 34 insertions(+), 35 deletions(-) diff --git a/addons/compat_csla/compat_csla_explosives/config.cpp b/addons/compat_csla/compat_csla_explosives/config.cpp index d85e9f34a80..95f9534cca1 100644 --- a/addons/compat_csla/compat_csla_explosives/config.cpp +++ b/addons/compat_csla/compat_csla_explosives/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_gm/compat_gm_explosives/config.cpp b/addons/compat_gm/compat_gm_explosives/config.cpp index 1f109217bae..0714a170b10 100644 --- a/addons/compat_gm/compat_gm_explosives/config.cpp +++ b/addons/compat_gm/compat_gm_explosives/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_gm/compat_gm_refuel/config.cpp b/addons/compat_gm/compat_gm_refuel/config.cpp index bd98e252ead..097cdeafe9e 100644 --- a/addons/compat_gm/compat_gm_refuel/config.cpp +++ b/addons/compat_gm/compat_gm_refuel/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp index 7ab5db1f783..c64dd010df6 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp @@ -4,7 +4,7 @@ #include "\z\ace\addons\csw\script_config_macros_csw.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {QGVAR(2b14_carry), QGVAR(nsv_carry), QGVAR(kord_carry), QGVAR(ags30_carry), QGVAR(spg9_carry), QGVAR(spg9m_carry), QGVAR(metis_carry), QGVAR(kornet_carry)}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp index 3de68b6b5a8..c0861a5872c 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp index f91aca81ee1..6cffcf72c5a 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp @@ -4,7 +4,7 @@ #include "\z\ace\addons\fastroping\script_macros.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp index 14459aada32..4a349ababe9 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_nightvision/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp index 1b6ac9471b3..5101a383a31 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_refuel/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp index bd31d036bbe..6ca402478f2 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_scopes/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp index 3c2eca298cf..29fc02bb0ad 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp @@ -4,7 +4,7 @@ #include "\z\ace\addons\csw\script_config_macros_csw.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {QGVAR(dshkm_carry)}; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp index ea39fbccc4c..e1e71ebbfa7 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp index 45cace6afff..c6d190201a2 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp @@ -4,7 +4,7 @@ #include "\z\ace\addons\fastroping\script_macros.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp index e70260b56a5..12cf2a9a553 100644 --- a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp +++ b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp index 19139f5b005..d694a3f8d35 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp @@ -4,7 +4,7 @@ #include "\z\ace\addons\csw\script_config_macros_csw.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {QGVAR(m252_carry), QGVAR(m2_carry), QGVAR(mk19_carry), QGVAR(tow_carry)}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp index 528993267f2..5c91eb2a738 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp index 311807de872..7e8ffc93a85 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp @@ -4,7 +4,7 @@ #include "\z\ace\addons\fastroping\script_macros.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp index 2e20a210f85..370fc32071d 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp index 643969bcf77..f237fed9136 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp index d32d7a79c33..c6e77dc6720 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp index 832e01fe4a1..d397b7aef27 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/addons/compat_sog/compat_sog_trenches/config.cpp b/addons/compat_sog/compat_sog_trenches/config.cpp index 9559ddf1891..68fccc2fa30 100644 --- a/addons/compat_sog/compat_sog_trenches/config.cpp +++ b/addons/compat_sog/compat_sog_trenches/config.cpp @@ -1,14 +1,12 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { - "loadorder_f_vietnam", "ace_trenches" - }; + requiredAddons[] = {"loadorder_f_vietnam", "ace_trenches"}; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"BaerMitUmlaut", "veteran29"}; diff --git a/addons/compat_sog/compat_sog_trenches_grad/config.cpp b/addons/compat_sog/compat_sog_trenches_grad/config.cpp index 8a253244547..06d670fb9a3 100644 --- a/addons/compat_sog/compat_sog_trenches_grad/config.cpp +++ b/addons/compat_sog/compat_sog_trenches_grad/config.cpp @@ -1,14 +1,12 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { - "loadorder_f_vietnam", "ace_compat_sog_trenches", "grad_trenches_main" - }; + requiredAddons[] = {"loadorder_f_vietnam", "ace_compat_sog_trenches", "grad_trenches_main"}; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"BaerMitUmlaut", "veteran29"}; diff --git a/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp b/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp index 055806407f6..899c7f74af1 100644 --- a/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp +++ b/addons/compat_ws/compat_ws_nouniformrestrictions/config.cpp @@ -1,7 +1,7 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index 7aa5b7de2e9..e3d89293a86 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -16,10 +16,10 @@ An example is the path that is built from defines. Some available in this file, others in mods and addons. Follows Standard: - Object variables: PREFIX_COMPONENT (or PREFIX_COMPONENT_SUBCOMPONENT) + Object variables: PREFIX_COMPONENT Main-object variables: PREFIX_main - Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf (or MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SUBCOMPONENT\SCRIPTNAME.sqf) - e.g: x\six\addons\sys_menu\fDate.sqf (or x\six\addons\sys_menu\compat\fDate.sqf) + Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf + e.g: x\six\addons\sys_menu\fDate.sqf Usage: define PREFIX and COMPONENT, then include this file @@ -31,6 +31,7 @@ use in subcomponents (subconfigs) define SUBCOMPONENT and include parent component's script_component.hpp + currently only supported by SUBADDON, additional macros may be added in the future TODO: - Try only to use 1 string type " vs ' @@ -54,12 +55,11 @@ #define MAINLOGIC main #endif +#define ADDON DOUBLES(PREFIX,COMPONENT) #define MAIN_ADDON DOUBLES(PREFIX,main) #ifdef SUBCOMPONENT - #define ADDON TRIPLES(PREFIX,COMPONENT,SUBCOMPONENT) -#else - #define ADDON DOUBLES(PREFIX,COMPONENT) + #define SUBADDON DOUBLES(ADDON,SUBCOMPONENT) #endif /* ------------------------------------------- @@ -897,10 +897,13 @@ Macro: GVAR() Sickboy ------------------------------------------- */ #define GVAR(var1) DOUBLES(ADDON,var1) +#define SUBGVAR(var1) TRIPLES(ADDON,SUBCOMPONENT,var1) #define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2) #define QGVAR(var1) QUOTE(GVAR(var1)) +#define QSUBGVAR(var1) QUOTE(SUBGVAR(var1)) #define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2)) #define QQGVAR(var1) QUOTE(QGVAR(var1)) +#define QQSUBGVAR(var1) QUOTE(QSUBGVAR(var1)) #define QQEGVAR(var1,var2) QUOTE(QEGVAR(var1,var2)) /* ------------------------------------------- From 89a1b941397cb291b6f8013a66c214e3f2f2b3f4 Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 8 Sep 2023 19:31:30 +0200 Subject: [PATCH 4/8] Move CSW and Fastroping includes to script_component.hpp --- addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp | 3 --- .../compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp | 2 ++ addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp | 3 --- .../compat_rhs_afrf3_fastroping/script_component.hpp | 2 ++ addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp | 3 --- .../compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp | 2 ++ addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp | 3 --- .../compat_rhs_gref3_fastroping/script_component.hpp | 2 ++ addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp | 3 --- .../compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp | 2 ++ addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp | 3 --- .../compat_rhs_usf3_fastroping/script_component.hpp | 2 ++ 12 files changed, 12 insertions(+), 18 deletions(-) diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp index c64dd010df6..4018785e823 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/config.cpp @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Config will be binerized, so this include is only required at build-time -#include "\z\ace\addons\csw\script_config_macros_csw.hpp" - class CfgPatches { class SUBADDON { name = COMPONENT_NAME; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp index df63a0068ee..6af07b18894 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/script_component.hpp @@ -1,3 +1,5 @@ #define SUBCOMPONENT csw #define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons #include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" + +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp index 6cffcf72c5a..8809558aa6f 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/config.cpp @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Config will be binerized, so this include is only required at build-time -#include "\z\ace\addons\fastroping\script_macros.hpp" - class CfgPatches { class SUBADDON { name = COMPONENT_NAME; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp index 1acf9dc4f56..58990400539 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_fastroping/script_component.hpp @@ -1,3 +1,5 @@ #define SUBCOMPONENT fastroping #define SUBCOMPONENT_BEAUTIFIED Fastroping #include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" + +#include "\z\ace\addons\fastroping\script_macros.hpp" diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp index 29fc02bb0ad..2628bffcd55 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/config.cpp @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Config will be binerized, so this include is only required at build-time -#include "\z\ace\addons\csw\script_config_macros_csw.hpp" - class CfgPatches { class SUBADDON { name = COMPONENT_NAME; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp index 68deb3564b2..fbe9f419d20 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/script_component.hpp @@ -1,3 +1,5 @@ #define SUBCOMPONENT csw #define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons #include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" + +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp index c6d190201a2..b057aa1267f 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/config.cpp @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Config will be binerized, so this include is only required at build-time -#include "\z\ace\addons\fastroping\script_macros.hpp" - class CfgPatches { class SUBADDON { name = COMPONENT_NAME; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp index 992a698006d..f169255ce03 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_fastroping/script_component.hpp @@ -1,3 +1,5 @@ #define SUBCOMPONENT fastroping #define SUBCOMPONENT_BEAUTIFIED Fastroping #include "\z\ace\addons\compat_rhs_gref3\script_component.hpp" + +#include "\z\ace\addons\fastroping\script_macros.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp index d694a3f8d35..1ee02c8496d 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Config will be binerized, so this include is only required at build-time -#include "\z\ace\addons\csw\script_config_macros_csw.hpp" - class CfgPatches { class SUBADDON { name = COMPONENT_NAME; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp index 172be7b7195..27c2b85b156 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/script_component.hpp @@ -1,3 +1,5 @@ #define SUBCOMPONENT csw #define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons #include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" + +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp index 7e8ffc93a85..ad3c97d1c4f 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/config.cpp @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Config will be binerized, so this include is only required at build-time -#include "\z\ace\addons\fastroping\script_macros.hpp" - class CfgPatches { class SUBADDON { name = COMPONENT_NAME; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp index fb12432d7f7..38282d1b1b4 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_fastroping/script_component.hpp @@ -1,3 +1,5 @@ #define SUBCOMPONENT fastroping #define SUBCOMPONENT_BEAUTIFIED Fastroping #include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" + +#include "\z\ace\addons\fastroping\script_macros.hpp" From 7a8ec884b9cf4a737f2f4c017050f22bf51d3b35 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 9 Sep 2023 13:38:31 +0200 Subject: [PATCH 5/8] HuntIR - Use subcomponent macro in subconfig --- addons/huntir/subConfig/config.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/huntir/subConfig/config.cpp b/addons/huntir/subConfig/config.cpp index 29a9f0ca258..cbfae1851c3 100644 --- a/addons/huntir/subConfig/config.cpp +++ b/addons/huntir/subConfig/config.cpp @@ -1,9 +1,8 @@ -#include "\z\ace\addons\huntir\script_component.hpp" -#undef COMPONENT -#define COMPONENT huntir_sub +#define SUBCOMPONENT sub +#include "..\script_component.hpp" class CfgPatches { - class ADDON { + class SUBADDON { name = COMPONENT_NAME; units[] = {}; weapons[] = {}; @@ -12,6 +11,8 @@ class CfgPatches { author = ECSTRING(common,ACETeam); url = ECSTRING(main,URL); VERSION_CONFIG; + + addonRootClass = QUOTE(COMPONENT); }; }; From e04700a82b331d7e8e67561268aa11806bb455d0 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 9 Sep 2023 14:09:07 +0200 Subject: [PATCH 6/8] Update CBA include --- include/x/cba/addons/main/script_macros_common.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index e3d89293a86..2f3980a2504 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -897,13 +897,10 @@ Macro: GVAR() Sickboy ------------------------------------------- */ #define GVAR(var1) DOUBLES(ADDON,var1) -#define SUBGVAR(var1) TRIPLES(ADDON,SUBCOMPONENT,var1) #define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2) #define QGVAR(var1) QUOTE(GVAR(var1)) -#define QSUBGVAR(var1) QUOTE(SUBGVAR(var1)) #define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2)) #define QQGVAR(var1) QUOTE(QGVAR(var1)) -#define QQSUBGVAR(var1) QUOTE(QSUBGVAR(var1)) #define QQEGVAR(var1,var2) QUOTE(QEGVAR(var1,var2)) /* ------------------------------------------- From 8bb447e1ba2f086594e63eeb01de9e017ee55633 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 9 Sep 2023 18:26:16 +0200 Subject: [PATCH 7/8] Flat defines --- addons/main/script_mod.hpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 542a4a47135..167466d8532 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -13,12 +13,11 @@ #define REQUIRED_VERSION 2.14 #define REQUIRED_CBA_VERSION {3,15,7} -#ifdef COMPONENT_BEAUTIFIED - #ifdef SUBCOMPONENT_BEAUTIFIED - #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED - SUBCOMPONENT_BEAUTIFIED) - #else - #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) - #endif +#ifndef COMPONENT_BEAUTIFIED + #define COMPONENT_BEAUTIFIED COMPONENT +#endif +#ifdef SUBCOMPONENT_BEAUTIFIED + #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED - SUBCOMPONENT_BEAUTIFIED) #else - #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT) + #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) #endif From b607d747e8d55effac00842041da922737fb6eff Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 9 Sep 2023 23:53:59 +0200 Subject: [PATCH 8/8] Fix subcomponent `addonRootClass` --- addons/compat_gm/compat_gm_explosives/config.cpp | 2 +- addons/compat_gm/compat_gm_refuel/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp | 2 +- addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp | 2 +- addons/huntir/subConfig/config.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/compat_gm/compat_gm_explosives/config.cpp b/addons/compat_gm/compat_gm_explosives/config.cpp index 0714a170b10..e240c283896 100644 --- a/addons/compat_gm/compat_gm_explosives/config.cpp +++ b/addons/compat_gm/compat_gm_explosives/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_gm/compat_gm_refuel/config.cpp b/addons/compat_gm/compat_gm_refuel/config.cpp index 097cdeafe9e..6becabe70a9 100644 --- a/addons/compat_gm/compat_gm_refuel/config.cpp +++ b/addons/compat_gm/compat_gm_refuel/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp index 1ee02c8496d..9e4940dd67d 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp index 5c91eb2a738..9db8a0432d4 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp index 370fc32071d..de6f0491c60 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp index f237fed9136..54da457d4f5 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_nightvision/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp index c6e77dc6720..391e22d95e8 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp index d397b7aef27..62db11efe88 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_scopes/config.cpp @@ -16,7 +16,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; }; diff --git a/addons/huntir/subConfig/config.cpp b/addons/huntir/subConfig/config.cpp index cbfae1851c3..a75b34f2531 100644 --- a/addons/huntir/subConfig/config.cpp +++ b/addons/huntir/subConfig/config.cpp @@ -12,7 +12,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; - addonRootClass = QUOTE(COMPONENT); + addonRootClass = QUOTE(ADDON); }; };