From ffcd4feb4ee75c7e93d0cf8a8f5255abd926c047 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Thu, 15 May 2025 17:53:25 -0300 Subject: [PATCH] exploded main addon to divide componenets into addons for each feature --- addons/client/config.cpp | 23 +++++++++++++++++++++ addons/{main => client}/initPlayerLocal.sqf | 0 addons/client/script_component.hpp | 17 +++++++++++++++ addons/main/config.cpp | 2 +- addons/server/script_component.hpp | 17 +++++++++++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 addons/client/config.cpp rename addons/{main => client}/initPlayerLocal.sqf (100%) create mode 100644 addons/client/script_component.hpp create mode 100644 addons/server/script_component.hpp diff --git a/addons/client/config.cpp b/addons/client/config.cpp new file mode 100644 index 0000000..f3d1523 --- /dev/null +++ b/addons/client/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredAddons[] = { + "cba_main", + "ace_main", + "armatak_main" + }; + requiredVersion = REQUIRED_VERSION; + author = PROJECT_AUTHOR; + url = "https://github.com/valmojr/armatak"; + }; +}; + +class Extended_PostInit_EventHandlers { + class armatak_main { + init = "call compileScript ['\armatak\armatak\armatak_client\initPlayerLocal.sqf']"; + }; +}; diff --git a/addons/main/initPlayerLocal.sqf b/addons/client/initPlayerLocal.sqf similarity index 100% rename from addons/main/initPlayerLocal.sqf rename to addons/client/initPlayerLocal.sqf diff --git a/addons/client/script_component.hpp b/addons/client/script_component.hpp new file mode 100644 index 0000000..72e2c7f --- /dev/null +++ b/addons/client/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT client +#define COMPONENT_BEAUTIFIED WebSocket +#include "\armatak\armatak\armatak_main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/main/config.cpp b/addons/main/config.cpp index bbd95ef..0d8ad42 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -13,7 +13,7 @@ class CfgPatches { "ace_main" }; requiredVersion = REQUIRED_VERSION; - author = QUOTE(Valmo); + author = PROJECT_AUTHOR; url = "https://github.com/valmojr/armatak"; }; }; diff --git a/addons/server/script_component.hpp b/addons/server/script_component.hpp new file mode 100644 index 0000000..29c2735 --- /dev/null +++ b/addons/server/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT server +#define COMPONENT_BEAUTIFIED TCP Socket +#include "\armatak\armatak\armatak_main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "\z\ace\addons\main\script_macros.hpp"