mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 20:43:30 +00:00
Moved Server and video info from main to its own addons
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1 +1,3 @@
|
||||
PREP(notify)
|
||||
PREP(initCOTRouter);
|
||||
PREP(logMessage);
|
||||
PREP(notify);
|
||||
@@ -1,55 +0,0 @@
|
||||
params [
|
||||
["_logic", objNull, [objNull]],
|
||||
["_units", [], [[]]],
|
||||
["_activated", true, [true]]
|
||||
];
|
||||
|
||||
if (isServer) exitWith {
|
||||
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
|
||||
_tak_server_instance_address = _logic getVariable "armatak_module_tak_server_instance_address";
|
||||
_tak_server_instance_port = _logic getVariable "armatak_module_tak_server_instance_port";
|
||||
|
||||
_tak_server_fulladdress = _tak_server_instance_address + ":" + (str _tak_server_instance_port);
|
||||
|
||||
missionNamespace setVariable ["armatak_server_instance", _tak_server_fulladdress];
|
||||
missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
|
||||
missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
|
||||
|
||||
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
|
||||
|
||||
_syncUnits = synchronizedObjects _logic;
|
||||
|
||||
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
|
||||
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
[{
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
{
|
||||
_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;
|
||||
|
||||
[_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;
|
||||
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
|
||||
|
||||
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
||||
};
|
||||
if (unitIsUAV _x) then {
|
||||
[_x] call armatak_fnc_send_drone_cot;
|
||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||
};
|
||||
} forEach _syncedUnits;
|
||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
true;
|
||||
@@ -1,51 +0,0 @@
|
||||
disableSerialization;
|
||||
|
||||
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
|
||||
call armatak_fnc_handleCallbacks;
|
||||
|
||||
_tak_server_instance_address = ctrlText 14000;
|
||||
_tak_server_instance_port = ctrlText 14001;
|
||||
|
||||
_tak_server_fulladdress = ((_tak_server_instance_address) + ":" + (str _tak_server_instance_port));
|
||||
|
||||
missionNamespace setVariable ["armatak_server_instance", _tak_server_fulladdress];
|
||||
missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
|
||||
missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
|
||||
|
||||
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
|
||||
|
||||
_syncUnits = [];
|
||||
|
||||
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
|
||||
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
[{
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
{
|
||||
_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;
|
||||
|
||||
[_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;
|
||||
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
|
||||
|
||||
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
||||
};
|
||||
if (unitIsUAV _x) then {
|
||||
[_x] call armatak_fnc_send_drone_cot;
|
||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||
};
|
||||
} forEach _syncedUnits;
|
||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
closeDialog 1;
|
||||
@@ -1,5 +0,0 @@
|
||||
disableSerialization;
|
||||
|
||||
createDialog "armatak_zeus_core_module_dialog";
|
||||
|
||||
waitUntil {!isNull (findDisplay 999991);};
|
||||
Reference in New Issue
Block a user