exploded main addon to divide componenets into addons for each feature

This commit is contained in:
Valmo Trindade
2025-05-15 17:53:25 -03:00
parent 39f4936bf7
commit ffcd4feb4e
5 changed files with 58 additions and 1 deletions

23
addons/client/config.cpp Normal file
View File

@@ -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']";
};
};

View File

@@ -0,0 +1,18 @@
if (!hasInterface) exitWith {};
_local_address = "armatak" callExtension ["local_ip", []] select 0;
player setVariable ["localAddress", _local_address];
player addEventHandler ["Respawn", {
params["_unit", "_corpse"];
[{
if (alive _this) then {
"armatak" callExtension ["websocket:location", [player call armatak_fnc_extract_position]];
};
}, 1, []] call CBA_fnc_addPerFrameHandler;
}];
[{
"armatak" callExtension ["websocket:location", [player call armatak_fnc_extract_position]];
}, 1, []] call CBA_fnc_addPerFrameHandler;

View File

@@ -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"