diff --git a/.hemtt/project.toml b/.hemtt/project.toml index e9ee339..0c2309e 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -41,6 +41,7 @@ workshop = [ "450814997", # CBA_A3 "2369477168", # ADT "463939057", # ACE +# "766491311", # KKA3 ACE Extension ] parameters = [ "-name=dev", diff --git a/addons/compatibility/$PBOPREFIX$ b/addons/compatibility/$PBOPREFIX$ new file mode 100644 index 0000000..8a85caa --- /dev/null +++ b/addons/compatibility/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afm\addons\compatibility diff --git a/addons/compatibility/README.md b/addons/compatibility/README.md new file mode 100644 index 0000000..ecbc442 --- /dev/null +++ b/addons/compatibility/README.md @@ -0,0 +1,3 @@ +# Compatiblity + +Adds compatiblity for various mods, loaded as needed thanks to `skipWhenMissingDependencies` diff --git a/addons/compatibility/config.cpp b/addons/compatibility/config.cpp new file mode 100644 index 0000000..763f4b4 --- /dev/null +++ b/addons/compatibility/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afm_main", + "A3_Data_F_Decade_Loadorder" + }; + author = "ArmaForces"; + authors[] = {"veteran29"}; + VERSION_CONFIG; + }; +}; diff --git a/addons/compatibility/kka3_ace_extension/CfgMoves.hpp b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp new file mode 100644 index 0000000..2ee2eb9 --- /dev/null +++ b/addons/compatibility/kka3_ace_extension/CfgMoves.hpp @@ -0,0 +1,47 @@ + +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class AmovPercMstpSnonWnonDnon; + class CutSceneAnimationBase; + class relax_44: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_45: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class attention1: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class attention2: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class attention3: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_tes: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_21: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_24: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_3: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_32: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_8: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class relax_7: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + class rattention2: CutSceneAnimationBase { + actions = "CivilStandActions"; + }; + }; +}; diff --git a/addons/compatibility/kka3_ace_extension/config.cpp b/addons/compatibility/kka3_ace_extension/config.cpp new file mode 100644 index 0000000..933530b --- /dev/null +++ b/addons/compatibility/kka3_ace_extension/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "KKA3_ACE_Extension_Anim" + }; + skipWhenMissingDependencies = 1; + author = "ArmaForces"; + authors[] = {"veteran29"}; + VERSION_CONFIG; + }; +}; + +#include "CfgMoves.hpp" diff --git a/addons/compatibility/kka3_ace_extension/script_component.hpp b/addons/compatibility/kka3_ace_extension/script_component.hpp new file mode 100644 index 0000000..e54253e --- /dev/null +++ b/addons/compatibility/kka3_ace_extension/script_component.hpp @@ -0,0 +1,2 @@ +#define SUBCOMPONENT kka3_ace_extension +#include "..\script_component.hpp" diff --git a/addons/compatibility/script_component.hpp b/addons/compatibility/script_component.hpp new file mode 100644 index 0000000..e363173 --- /dev/null +++ b/addons/compatibility/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT compatibility +#include "\z\afm\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_COMPATIBILITY + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_COMPATIBILITY + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMPATIBILITY +#endif + +#include "\z\afm\addons\main\script_macros.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 264ae73..3a3c3b3 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -7,7 +7,7 @@ #define VERSION_STR MAJOR.MINOR.PATCH #define VERSION_AR MAJOR,MINOR,PATCH -#define REQUIRED_VERSION 2.00 +#define REQUIRED_VERSION 2.14 #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(AFM - COMPONENT_BEAUTIFIED) diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index be13021..2683f3b 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -15,7 +15,7 @@ - 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: + Follows Standard: Object variables: PREFIX_COMPONENT Main-object variables: PREFIX_main Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf @@ -29,6 +29,10 @@ 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 + currently only supported by SUBADDON, additional macros may be added in the future + TODO: - Try only to use 1 string type " vs ' - Evaluate double functions, and simplification @@ -54,6 +58,10 @@ #define ADDON DOUBLES(PREFIX,COMPONENT) #define MAIN_ADDON DOUBLES(PREFIX,main) +#ifdef SUBCOMPONENT + #define SUBADDON DOUBLES(ADDON,SUBCOMPONENT) +#endif + /* ------------------------------------------- Macro: VERSION_CONFIG Define CBA Versioning System config entries. @@ -857,15 +865,10 @@ Macro: ISNILS() #define COMPILE_SCRIPT(var1) compileScript ['PATHTO_SYS(PREFIX,COMPONENT_F,var1)'] -#define VERSIONING_SYS(var1) class CfgSettings \ -{ \ - class CBA \ - { \ - class Versioning \ - { \ - class var1 \ - { \ - }; \ +#define VERSIONING_SYS(var1) class CfgSettings { \ + class CBA { \ + class Versioning { \ + class var1 {}; \ }; \ }; \ }; @@ -1032,12 +1035,9 @@ Macro: PATHTO_FNC() #define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2)) #ifndef PRELOAD_ADDONS - #define PRELOAD_ADDONS class CfgAddons \ -{ \ - class PreloadAddons \ - { \ - class ADDON \ - { \ + #define PRELOAD_ADDONS class CfgAddons { \ + class PreloadAddons { \ + class ADDON { \ list[]={ QUOTE(ADDON) }; \ }; \ }; \ @@ -1275,9 +1275,11 @@ Macro: xSTRING() #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) + #define SUBCSTRING(var1) QUOTE(TRIPLES($STR,SUBADDON,var1)) #define LLSTRING(var1) localize QUOTE(TRIPLES(STR,ADDON,var1)) #define LELSTRING(var1,var2) localize QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define LSUBLSTRING(var1) localize QUOTE(TRIPLES(STR,SUBADDON,var1)) #endif