mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:33:29 +00:00
added initial zeus core module functions
This commit is contained in:
@@ -56,6 +56,13 @@ class CfgFunctions {
|
||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_shorten_name.sqf";
|
||||
};
|
||||
|
||||
class ZeusCoreModule_show {
|
||||
file = "\armatak\armatak\armatak_main\functions\gui\fn_ZeusCoreModule_show.sqf";
|
||||
};
|
||||
class ZeusCoreModule_configure {
|
||||
file = "\armatak\armatak\armatak_main\functions\gui\fn_ZeusCoreModule_configure.sqf";
|
||||
};
|
||||
|
||||
class convert_location {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_location.sqf";
|
||||
};
|
||||
|
||||
54
addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf
Normal file
54
addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
_armatak_tcp_socket_is_running = missionNamespace getVariable "armatak_tcp_socket_is_running";
|
||||
|
||||
if (isNil _armatak_tcp_socket_is_running) exitWith {
|
||||
_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 1400;
|
||||
_tak_server_instance_port = ctrlText 1401;
|
||||
|
||||
_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;
|
||||
5
addons/main/functions/gui/fn_ZeusCoreModule_show.sqf
Normal file
5
addons/main/functions/gui/fn_ZeusCoreModule_show.sqf
Normal file
@@ -0,0 +1,5 @@
|
||||
disableSerialization;
|
||||
|
||||
createDialog "armatak_zeus_core_module_dialog";
|
||||
|
||||
waitUntil {!isNull (findDisplay 999991);};
|
||||
Reference in New Issue
Block a user