removed private identifier from global variables

This commit is contained in:
Valmo Trindade
2025-05-13 01:09:51 -03:00
parent a997c54170
commit 01efe4e01d
3 changed files with 12 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
_armatak_tcp_socket_is_running = missionNamespace getVariable "_armatak_tcp_socket_is_running"; _armatak_tcp_socket_is_running = missionNamespace getVariable "armatak_tcp_socket_is_running";
if (_armatak_tcp_socket_is_running) then { if (_armatak_tcp_socket_is_running) then {
missionNamespace setVariable ["_armatak_tcp_socket_is_running", false]; missionNamespace setVariable ["armatak_tcp_socket_is_running", false];
"armatak" callExtension ["tcp_socket:stop", []]; "armatak" callExtension ["tcp_socket:stop", []];
} else { } else {

View File

@@ -3,7 +3,7 @@ params["_group"];
_group_name = _group getVariable "_atak_group_name"; _group_name = _group getVariable "_atak_group_name";
if (isNil "_group_name") then { if (isNil "_group_name") then {
_group_colors = missionNamespace getVariable "_group_colors"; _group_colors = missionNamespace getVariable "armatak_group_colors";
_group_name = selectRandom _group_colors; _group_name = selectRandom _group_colors;
if (count _group_colors > 0) then { if (count _group_colors > 0) then {
@@ -15,7 +15,7 @@ if (isNil "_group_name") then {
_group_name = _selectedColor; _group_name = _selectedColor;
_group setVariable ["_atak_group_name", _group_name]; _group setVariable ["_atak_group_name", _group_name];
missionNamespace setVariable ["_group_colors", _group_colors] missionNamespace setVariable ["armatak_group_colors", _group_colors]
} else { } else {
_group_name = "Red"; _group_name = "Red";
_group setVariable ["_atak_group_name", _group_name]; _group setVariable ["_atak_group_name", _group_name];

View File

@@ -8,50 +8,27 @@ if (isServer) exitWith {
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."]; _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."];
[[_warning, 1.5]] call CBA_fnc_notify; [[_warning, 1.5]] call CBA_fnc_notify;
addMissionEventHandler ["ExtensionCallback", {
params ["_name", "_function", "_data"];
if (_name == "armatak_tcp_socket") then {
_warning = format ["<t color='#00FF21'>ARMATAK</t><br/> %1", _function];
[[_warning, 1.5]] call CBA_fnc_notify;
};
if (_name == "armatak_tcp_socket_error") then {
_warning = format ["<t color='#FF0021'>ARMATAK</t><br/> %1", _function];
[[_warning, 1.5]] call CBA_fnc_notify;
};
if (_name == "armatak_video") then {
_warning = format ["<t color='#00FF21'>ARMATAK Video</t><br/> %1", _function];
[[_warning, 1.5]] call CBA_fnc_notify;
};
if (_name == "armatak_video_error") then {
_warning = format ["<t color='#FF0021'>ARMATAK Video</t><br/> %1", _function];
[[_warning, 1.5]] call CBA_fnc_notify;
};
}];
_tak_server_instance_address = _logic getVariable "armatak_module_tak_server_instance_address"; _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_instance_port = _logic getVariable "armatak_module_tak_server_instance_port";
_tak_server_fulladdress = _tak_server_instance_address + ":" + (str _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_server_instance", _tak_server_fulladdress];
missionNamespace setVariable ["_armatak_tcp_socket_is_running", true]; missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
missionNamespace setVariable ["_atak_server_instance", _tak_server_fulladdress]; missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
missionNamespace setVariable ["_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
call armatak_fnc_handleCallbacks;
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]]; "armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
_syncUnits = synchronizedObjects _logic; _syncUnits = synchronizedObjects _logic;
missionNamespace setVariable ["_armatak_marked_units", _syncUnits]; missionNamespace setVariable ["armatak_marked_units", _syncUnits];
_syncedUnits = missionNamespace getVariable "_armatak_marked_units"; _syncedUnits = missionNamespace getVariable "armatak_marked_units";
[{ [{
_syncedUnits = missionNamespace getVariable "_armatak_marked_units"; _syncedUnits = missionNamespace getVariable "armatak_marked_units";
{ {
_objectType = _x call BIS_fnc_objectType; _objectType = _x call BIS_fnc_objectType;