From f04c0141efb8bd44843a4901f8e3d41bd0ba9511 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Mon, 19 May 2025 23:34:18 -0300 Subject: [PATCH] Moved dialog window for TCP Socket connection startup to server addon --- addons/main/config.cpp | 1 - addons/server/config.cpp | 102 +++-------------------------- addons/{main => server}/dialog.hpp | 2 +- 3 files changed, 9 insertions(+), 96 deletions(-) rename addons/{main => server}/dialog.hpp (98%) diff --git a/addons/main/config.cpp b/addons/main/config.cpp index ceb0816..7cd6f17 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -44,4 +44,3 @@ class CfgFactionClasses { #include "CfgEventHandlers.hpp" #include "CfgFunctions.hpp" #include "Cfg3den.hpp" -#include "dialog.hpp" \ No newline at end of file diff --git a/addons/server/config.cpp b/addons/server/config.cpp index 84bfe91..20f9d8e 100644 --- a/addons/server/config.cpp +++ b/addons/server/config.cpp @@ -4,14 +4,15 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = { - QGVAR(coreModule) + QGVAR(coreModule), + QGVAR(coreModuleCurator) }; weapons[] = {}; requiredAddons[] = { - "cba_main", - "ace_main", - "armatak_main" - }; + "cba_main", + "ace_main", + "armatak_main" + }; requiredVersion = REQUIRED_VERSION; author = PROJECT_AUTHOR; url = "https://github.com/valmojr/armatak"; @@ -19,92 +20,5 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" - -class CfgVehicles { - class Logic; - class Module_F : Logic - { - class AttributesBase - { - class Default; - class Edit; - class Combo; - class Checkbox; - class CheckboxNumber; - class ModuleDescription; - class Units; - }; - - class ModuleDescription - { - class AnyBrain; - }; - }; - - class GVAR(coreModule): Module_F { - scope = 2; - scopeCurator = 2; - displayname = "ARMATAK CoT Router"; - icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa"; - category = QEGVAR(main,moduleCategory); - function = QFUNC(3denCoreModuleConfig); - functionPriority = 1; - isGlobal = 0; - isTriggerActivated = 1; - isDisposable = 1; - is3den = 0; - curatorCanAttach = 0; - curatorInfoType = "armatak_zeus_core_module_dialog"; - - canSetArea = 0; - canSetAreaShape = 0; - canSetAreaHeight = 0; - - class AttributesValues { - size3[] = { 1, 1, -1 }; - isRectangle = 0; - }; - - class Attributes: AttributesBase { - class GVAR(moduleInstanceAddress): Edit { - property = QGVAR(moduleInstanceAddress); - displayname = "TAK Server Address"; - tooltip = "TAK Server Instance Address"; - typeName = "STRING"; - defaultValue = "localhost"; - }; - class GVAR(moduleInstancePort): Edit { - property = QGVAR(moduleInstancePort); - displayname = "TAK Server TCP Port"; - tooltip = "TAK Server instance Port for TCP connection"; - typeName = "NUMBER"; - defaultValue = "8088"; - }; - class ModuleDescription: ModuleDescription {}; - }; - - class ModuleDescription: ModuleDescription { - description = "Generate the initial ARMATAK configuration, syncronizing all players to the TAK server instance"; - sync[] = {"LocationArea_F"}; - - class LocationArea_F { - description[] = { - "This module will synchronize all", - "players to the TAK server instance" - }; - position = 1; - direction = 1; - optional = 1; - duplicate = 1; - synced[] = { "BluforUnit", "AnyBrain" }; - }; - class BluforUnit - { - description = "Short description"; - displayName = "Any BLUFOR unit"; - icon = "iconMan"; - side = 1; - }; - }; - }; -}; \ No newline at end of file +#include "dialog.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file diff --git a/addons/main/dialog.hpp b/addons/server/dialog.hpp similarity index 98% rename from addons/main/dialog.hpp rename to addons/server/dialog.hpp index c8ae8e0..d90ef8d 100644 --- a/addons/main/dialog.hpp +++ b/addons/server/dialog.hpp @@ -90,7 +90,7 @@ class armatak_zeus_core_module_dialog { { idc = 1600; text = "OK"; - action = "call armatak_fnc_ZeusCoreModule_configure;"; + action = QUOTE(call FUNC(zeusCoreModuleConfig)); x = "0.5 * safezoneW + safezoneX"; y = "0.555 * safezoneH + safezoneY"; w = "0.0515625 * safezoneW";