diff --git a/addons/main/CfgFunctions.hpp b/addons/main/CfgFunctions.hpp index a227351..1112a1f 100644 --- a/addons/main/CfgFunctions.hpp +++ b/addons/main/CfgFunctions.hpp @@ -1,9 +1,6 @@ class CfgFunctions { class armatak { class functions { - class init { - file = "\armatak\armatak\addons\main\functions\fn_init.sqf"; - }; class log_message { file = "\armatak\armatak\addons\main\functions\fn_log_message.sqf"; }; @@ -47,13 +44,6 @@ class CfgFunctions { file = "\armatak\armatak\addons\main\functions\extract_data\fn_shorten_name.sqf"; }; - class ZeusCoreModule_show { - file = "\armatak\armatak\addons\main\functions\gui\fn_ZeusCoreModule_show.sqf"; - }; - class ZeusCoreModule_configure { - file = "\armatak\armatak\addons\main\functions\gui\fn_ZeusCoreModule_configure.sqf"; - }; - class convert_to_altis { file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_altis.sqf"; }; diff --git a/addons/main/CfgVehicles.hpp b/addons/main/CfgVehicles.hpp index 8a5cc32..c883ff8 100644 --- a/addons/main/CfgVehicles.hpp +++ b/addons/main/CfgVehicles.hpp @@ -25,148 +25,4 @@ class CfgVehicles { class AnyBrain; }; }; - class armatak_module_core: Module_F { - scope = 2; - displayname = "ARMATAK CoT Router"; - icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa"; - category = "armatak_module_category"; - function = "armatak_fnc_init"; - functionPriority = 1; - isGlobal = 0; - isTriggerActivated = 0; - isDisposable = 1; - is3den = 0; - curatorCanAttach = 0; - curatorInfoType = "RscDisplayAttributeModuleNuke"; - - canSetArea = 0; - canSetAreaShape = 0; - canSetAreaHeight = 0; - - class AttributesValues { - size3[] = { 1, 1, -1 }; - isRectangle = 0; - }; - - class Attributes: AttributesBase { - class armatak_module_tak_server_instance_address: Edit { - property = "armatak_module_tak_server_instance_address"; - displayname = "TAK Server Address"; - tooltip = "TAK Server Instance Address"; - typeName = "STRING"; - defaultValue = "localhost"; - }; - class armatak_module_tak_server_instance_port: Edit { - property = "armatak_module_tak_server_instance_port"; - 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[] = { - "First line", - "Second line" - }; - position = 1; - direction = 1; - optional = 1; - duplicate = 1; - synced[] = { "BluforUnit", "AnyBrain" }; - }; - class BluforUnit - { - description = "Short description"; - displayName = "Any BLUFOR unit"; - icon = "iconMan"; - side = 1; - }; - }; - }; - class armatak_module_video_stream_core: armatak_module_core { - scope = 2; - displayname = "ARMATAK MediaMTX Video Feed Parser"; - icon = "\a3\Modules_F_Curator\Data\iconcuratorsetcamera_ca.paa"; - category = "armatak_module_category"; - function = "armatak_fnc_video_init"; - functionPriority = 1; - isGlobal = 0; - isTriggerActivated = 0; - isDisposable = 1; - is3den = 0; - curatorCanAttach = 0; - curatorInfoType = "RscDisplayAttributeModuleNuke"; - - canSetArea = 0; - canSetAreaShape = 0; - canSetAreaHeight = 0; - - class AttributesValues { - size3[] = { 1, 1, -1 }; - isRectangle = 0; - }; - - class Attributes: AttributesBase { - class armatak_module_mediamtx_video_stream_instance_address: Edit { - property = "armatak_module_mediamtx_video_stream_instance_address"; - displayname = "MediaMTX Provider Address"; - tooltip = "MediaMTX Provider Instance Address"; - typeName = "STRING"; - defaultValue = "localhost"; - }; - class armatak_module_mediamtx_video_stream_instance_port: Edit { - property = "armatak_module_mediamtx_video_stream_instance_port"; - displayname = "MediaMTX Provider Port"; - tooltip = "MediaMTX Provider Port for handling video streams"; - typeName = "STRING"; - defaultValue = "8554"; - }; - class armatak_module_mediamtx_video_stream_instance_auth_user: Edit { - property = "armatak_module_mediamtx_video_stream_instance_auth_user"; - displayname = "MediaMTX Provider Username"; - tooltip = "MediaMTX Provider Instance Username"; - typeName = "STRING"; - defaultValue = "administrator"; - }; - class armatak_module_mediamtx_video_stream_instance_auth_pass: Edit { - property = "armatak_module_mediamtx_video_stream_instance_auth_pass"; - displayname = "MediaMTX Provider Password"; - tooltip = "MediaMTX Provider Instance Password"; - typeName = "STRING"; - defaultValue = "password"; - }; - 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[] = { - "First line", - "Second line" - }; - 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 diff --git a/addons/main/XEH_PREP.hpp b/addons/main/XEH_PREP.hpp index 863414c..abc0273 100644 --- a/addons/main/XEH_PREP.hpp +++ b/addons/main/XEH_PREP.hpp @@ -1 +1,3 @@ -PREP(notify) \ No newline at end of file +PREP(initCOTRouter); +PREP(logMessage); +PREP(notify); \ No newline at end of file diff --git a/addons/main/functions/fn_log_message.sqf b/addons/main/functions/fnc_logMessage.sqf similarity index 100% rename from addons/main/functions/fn_log_message.sqf rename to addons/main/functions/fnc_logMessage.sqf diff --git a/addons/server/XEH_PREP.hpp b/addons/server/XEH_PREP.hpp index e69de29..eb3e8f8 100644 --- a/addons/server/XEH_PREP.hpp +++ b/addons/server/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(3denCoreModuleConfig); +PREP(ZeusCoreModuleConfig); +PREP(ZeusCoreModuleShow); \ No newline at end of file diff --git a/addons/server/config.cpp b/addons/server/config.cpp index af4af6c..c546f5b 100644 --- a/addons/server/config.cpp +++ b/addons/server/config.cpp @@ -16,4 +16,171 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" \ No newline at end of file +#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 armatak_module_core: Module_F { + scope = 2; + displayname = "ARMATAK CoT Router"; + icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa"; + category = "armatak_module_category"; + function = "armatak_fnc_init"; + functionPriority = 1; + isGlobal = 0; + isTriggerActivated = 0; + isDisposable = 1; + is3den = 0; + curatorCanAttach = 0; + curatorInfoType = "RscDisplayAttributeModuleNuke"; + + canSetArea = 0; + canSetAreaShape = 0; + canSetAreaHeight = 0; + + class AttributesValues { + size3[] = { 1, 1, -1 }; + isRectangle = 0; + }; + + class Attributes: AttributesBase { + class armatak_module_tak_server_instance_address: Edit { + property = "armatak_module_tak_server_instance_address"; + displayname = "TAK Server Address"; + tooltip = "TAK Server Instance Address"; + typeName = "STRING"; + defaultValue = "localhost"; + }; + class armatak_module_tak_server_instance_port: Edit { + property = "armatak_module_tak_server_instance_port"; + 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[] = { + "First line", + "Second line" + }; + position = 1; + direction = 1; + optional = 1; + duplicate = 1; + synced[] = { "BluforUnit", "AnyBrain" }; + }; + class BluforUnit + { + description = "Short description"; + displayName = "Any BLUFOR unit"; + icon = "iconMan"; + side = 1; + }; + }; + }; + class armatak_module_video_stream_core: armatak_module_core { + scope = 2; + displayname = "ARMATAK MediaMTX Video Feed Parser"; + icon = "\a3\Modules_F_Curator\Data\iconcuratorsetcamera_ca.paa"; + category = "armatak_module_category"; + function = "armatak_fnc_video_init"; + functionPriority = 1; + isGlobal = 0; + isTriggerActivated = 0; + isDisposable = 1; + is3den = 0; + curatorCanAttach = 0; + curatorInfoType = "RscDisplayAttributeModuleNuke"; + + canSetArea = 0; + canSetAreaShape = 0; + canSetAreaHeight = 0; + + class AttributesValues { + size3[] = { 1, 1, -1 }; + isRectangle = 0; + }; + + class Attributes: AttributesBase { + class armatak_module_mediamtx_video_stream_instance_address: Edit { + property = "armatak_module_mediamtx_video_stream_instance_address"; + displayname = "MediaMTX Provider Address"; + tooltip = "MediaMTX Provider Instance Address"; + typeName = "STRING"; + defaultValue = "localhost"; + }; + class armatak_module_mediamtx_video_stream_instance_port: Edit { + property = "armatak_module_mediamtx_video_stream_instance_port"; + displayname = "MediaMTX Provider Port"; + tooltip = "MediaMTX Provider Port for handling video streams"; + typeName = "STRING"; + defaultValue = "8554"; + }; + class armatak_module_mediamtx_video_stream_instance_auth_user: Edit { + property = "armatak_module_mediamtx_video_stream_instance_auth_user"; + displayname = "MediaMTX Provider Username"; + tooltip = "MediaMTX Provider Instance Username"; + typeName = "STRING"; + defaultValue = "administrator"; + }; + class armatak_module_mediamtx_video_stream_instance_auth_pass: Edit { + property = "armatak_module_mediamtx_video_stream_instance_auth_pass"; + displayname = "MediaMTX Provider Password"; + tooltip = "MediaMTX Provider Instance Password"; + typeName = "STRING"; + defaultValue = "password"; + }; + 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[] = { + "First line", + "Second line" + }; + 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 diff --git a/addons/main/functions/fn_init.sqf b/addons/server/functions/fnc_3denCoreModuleConfig.sqf similarity index 81% rename from addons/main/functions/fn_init.sqf rename to addons/server/functions/fnc_3denCoreModuleConfig.sqf index 7ec21c7..9413741 100644 --- a/addons/main/functions/fn_init.sqf +++ b/addons/server/functions/fnc_3denCoreModuleConfig.sqf @@ -1,3 +1,5 @@ +#include "..\script_component.hpp" + params [ ["_logic", objNull, [objNull]], ["_units", [], [[]]], @@ -31,12 +33,14 @@ if (isServer) exitWith { { _objectType = _x call BIS_fnc_objectType; if ((_objectType select 0) == "Soldier") then { - _callsign = [_x] call armatak_fnc_extract_unit_callsign; - _group_name = [group _x] call armatak_fnc_extract_group_color; - _group_role = [_x] call armatak_fnc_extract_group_role; + if (!GETVAR(_x,EVAR(client,eudConnected))) then { + _callsign = [_x] call armatak_fnc_extract_unit_callsign; + _group_name = [group _x] call armatak_fnc_extract_group_color; + _group_role = [_x] call armatak_fnc_extract_group_role; - [_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot; - [_x] call armatak_fnc_send_digital_pointer_cot; + [_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot; + [_x] call armatak_fnc_send_digital_pointer_cot; + }; }; if ((_objectType select 0) == "Vehicle") then { _atak_type = [_x] call armatak_fnc_extract_role; diff --git a/addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf b/addons/server/functions/fnc_ZeusCoreModuleConfig.sqf similarity index 98% rename from addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf rename to addons/server/functions/fnc_ZeusCoreModuleConfig.sqf index 59b307f..4382845 100644 --- a/addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf +++ b/addons/server/functions/fnc_ZeusCoreModuleConfig.sqf @@ -1,3 +1,5 @@ +#include "..\script_component.hpp" + disableSerialization; _warning = format ["ARMATAK
%1", "Connecting to TAK Server TCP Socket..."]; diff --git a/addons/main/functions/gui/fn_ZeusCoreModule_show.sqf b/addons/server/functions/fnc_ZeusCoreModuleShow.sqf similarity index 76% rename from addons/main/functions/gui/fn_ZeusCoreModule_show.sqf rename to addons/server/functions/fnc_ZeusCoreModuleShow.sqf index 64b9ca7..c23e9fe 100644 --- a/addons/main/functions/gui/fn_ZeusCoreModule_show.sqf +++ b/addons/server/functions/fnc_ZeusCoreModuleShow.sqf @@ -1,3 +1,5 @@ +#include "..\script_component.hpp" + disableSerialization; createDialog "armatak_zeus_core_module_dialog"; diff --git a/addons/video/CfgVehicles.hpp b/addons/video/CfgVehicles.hpp new file mode 100644 index 0000000..08dbe5e --- /dev/null +++ b/addons/video/CfgVehicles.hpp @@ -0,0 +1,101 @@ +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 armatak_module_core; + class armatak_module_video_stream_core: armatak_module_core { + scope = 2; + displayname = "ARMATAK MediaMTX Video Feed Parser"; + icon = "\a3\Modules_F_Curator\Data\iconcuratorsetcamera_ca.paa"; + category = "armatak_module_category"; + function = "armatak_fnc_video_init"; + functionPriority = 1; + isGlobal = 0; + isTriggerActivated = 0; + isDisposable = 1; + is3den = 0; + curatorCanAttach = 0; + curatorInfoType = "RscDisplayAttributeModuleNuke"; + + canSetArea = 0; + canSetAreaShape = 0; + canSetAreaHeight = 0; + + class AttributesValues { + size3[] = { 1, 1, -1 }; + isRectangle = 0; + }; + + class Attributes: AttributesBase { + class armatak_module_mediamtx_video_stream_instance_address: Edit { + property = "armatak_module_mediamtx_video_stream_instance_address"; + displayname = "MediaMTX Provider Address"; + tooltip = "MediaMTX Provider Instance Address"; + typeName = "STRING"; + defaultValue = "localhost"; + }; + class armatak_module_mediamtx_video_stream_instance_port: Edit { + property = "armatak_module_mediamtx_video_stream_instance_port"; + displayname = "MediaMTX Provider Port"; + tooltip = "MediaMTX Provider Port for handling video streams"; + typeName = "STRING"; + defaultValue = "8554"; + }; + class armatak_module_mediamtx_video_stream_instance_auth_user: Edit { + property = "armatak_module_mediamtx_video_stream_instance_auth_user"; + displayname = "MediaMTX Provider Username"; + tooltip = "MediaMTX Provider Instance Username"; + typeName = "STRING"; + defaultValue = "administrator"; + }; + class armatak_module_mediamtx_video_stream_instance_auth_pass: Edit { + property = "armatak_module_mediamtx_video_stream_instance_auth_pass"; + displayname = "MediaMTX Provider Password"; + tooltip = "MediaMTX Provider Instance Password"; + typeName = "STRING"; + defaultValue = "password"; + }; + 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[] = { + "First line", + "Second line" + }; + 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 diff --git a/addons/video/config.cpp b/addons/video/config.cpp index 0841f1f..fc7d754 100644 --- a/addons/video/config.cpp +++ b/addons/video/config.cpp @@ -11,7 +11,8 @@ class CfgPatches { requiredAddons[] = { "cba_main", "ace_main", - "armatak_main" + "armatak_main", + "armatak_server" }; requiredVersion = REQUIRED_VERSION; author = PROJECT_AUTHOR; @@ -38,4 +39,5 @@ class CfgMods { }; }; -#include "CfgEventHandlers.hpp" \ No newline at end of file +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file