diff --git a/addons/main/functions/api/fn_log_message.sqf b/addons/main/functions/api/fn_log_message.sqf deleted file mode 100644 index 9cc3a71..0000000 --- a/addons/main/functions/api/fn_log_message.sqf +++ /dev/null @@ -1,3 +0,0 @@ -params[_type, _message]; - -"armatak" callExtension ["log", [_type, _message]] \ No newline at end of file diff --git a/addons/main/functions/api/fn_ots_deleteMarkers.sqf b/addons/main/functions/api/fn_ots_deleteMarkers.sqf deleted file mode 100644 index 03f95ba..0000000 --- a/addons/main/functions/api/fn_ots_deleteMarkers.sqf +++ /dev/null @@ -1,3 +0,0 @@ -params["_marker"]; - -"armatak" callExtension ["ots_api:delete", _marker call armatak_fnc_extract_info]; \ No newline at end of file diff --git a/addons/main/functions/api/fn_ots_postMarkers.sqf b/addons/main/functions/api/fn_ots_postMarkers.sqf deleted file mode 100644 index 71d14d8..0000000 --- a/addons/main/functions/api/fn_ots_postMarkers.sqf +++ /dev/null @@ -1,3 +0,0 @@ -params["_markers"]; - -"armatak" callExtension ["ots_api:post", [[_markers]]]; \ No newline at end of file diff --git a/addons/main/functions/api/fn_ots_postMarkersDebug.sqf b/addons/main/functions/api/fn_ots_postMarkersDebug.sqf deleted file mode 100644 index 00cd797..0000000 --- a/addons/main/functions/api/fn_ots_postMarkersDebug.sqf +++ /dev/null @@ -1,3 +0,0 @@ -params["_markers"]; - -"armatak" callExtension ["ots_api:post_debug", [[markers]]]; \ No newline at end of file diff --git a/addons/main/functions/extract_data/fn_extract_drone_info.sqf b/addons/main/functions/extract_data/fn_extract_drone_info.sqf deleted file mode 100644 index b75892f..0000000 --- a/addons/main/functions/extract_data/fn_extract_drone_info.sqf +++ /dev/null @@ -1,39 +0,0 @@ -// function name: armatak_fnc_extract_drone -// function author: Valmo -// function description: Gets the drone information for the HTTP request - -params["_drone"]; - -private _location = (getPos _drone) call armatak_fnc_convert_location; -private _atak_uid = _drone call armatak_fnc_extract_uuid; -private _atak_latitude = _location select 0; -private _atak_longitude = _location select 1; -private _atak_speed = speed _drone; -private _atak_bearing = parseNumber ((getDir _drone) toFixed 0); -private _atak_role = "a-f-A"; -private _atak_callsign = getText(configFile >> "CfgVehicles" >> typeOf _drone >> "displayName"); -private _atak_server_instance = missionNamespace getVariable "_atak_server_instance"; -private _atak_server_instance_token = missionNamespace getVariable "_atak_server_instance_token"; -private _atak_altitude = _location select 2; - -switch (side _drone) do { - case "WEST": { - _atak_role = "a-f-A-M-F-Q" - }; - case "EAST": { - _atak_role = "a-h-A-M-F-Q" - }; - case "INDEPENDENT": { - _atak_role = "a-n-A-M-F-Q" - }; - case "CIVILIAN": { - _atak_role = "a-f-A-C" - }; - default { - _atak_role = "a-f-A-M-F-Q" - }; -}; - -_drone_info = [_atak_uid, _atak_latitude, _atak_longitude, _atak_speed, _atak_bearing, _atak_role, _atak_callsign, _atak_altitude, _atak_server_instance, _atak_server_instance_token]; - -_drone_info \ No newline at end of file diff --git a/addons/main/functions/extract_data/fn_extract_info.sqf b/addons/main/functions/extract_data/fn_extract_info.sqf deleted file mode 100644 index 51fe916..0000000 --- a/addons/main/functions/extract_data/fn_extract_info.sqf +++ /dev/null @@ -1,22 +0,0 @@ -// function name: armatak_fnc_extract_info -// function author: Valmo -// function description: Receives a player's unit as param and return the information array needed to send the HTTP request - -params["_unit"]; - -private _location = (getPos _unit) call armatak_fnc_convert_location; - -private _atak_uid = [_unit] call armatak_fnc_extract_uuid; -private _atak_latitude = _location select 0; -private _atak_longitude = _location select 1; -private _atak_speed = speed _unit; -private _atak_bearing = parseNumber ((getDir _unit) toFixed 0); -private _atak_role = [_unit] call armatak_fnc_extract_role; -private _atak_callsign = [_unit] call armatak_fnc_extract_callsign; -private _atak_altitude = _location select 2; -private _atak_server_instance = missionNamespace getVariable "_atak_server_instance"; -private _atak_server_instance_token = missionNamespace getVariable "_atak_server_instance_token"; - -_unit_info = [_atak_uid, _atak_latitude, _atak_longitude, _atak_speed, _atak_bearing, _atak_role, _atak_callsign, _atak_altitude, _atak_server_instance, _atak_server_instance_token]; - -_unit_info \ No newline at end of file diff --git a/addons/main/functions/extract_data/fn_extract_side.sqf b/addons/main/functions/extract_data/fn_extract_side.sqf deleted file mode 100644 index 671b570..0000000 --- a/addons/main/functions/extract_data/fn_extract_side.sqf +++ /dev/null @@ -1,25 +0,0 @@ -// function name: armatak_fnc_extract_side -// function author: Valmo -// function description: Gets the unit side - -params["_unit"]; - -_side = "friendly"; -switch (side _unit) do { - case "WEST": { - _side = "friendly"; - }; - case "EAST": { - _side = "hostile"; - }; - case "INDEPENDENT": { - _side = "neutral"; - }; - case "CIVILIAN": { - _side = "unknown"; - }; - default { - _side = "friendly"; - }; -}; -_side \ No newline at end of file diff --git a/addons/main/functions/extract_data/fn_ots_extract_auth_token.sqf b/addons/main/functions/extract_data/fn_ots_extract_auth_token.sqf deleted file mode 100644 index ea1d72e..0000000 --- a/addons/main/functions/extract_data/fn_ots_extract_auth_token.sqf +++ /dev/null @@ -1,22 +0,0 @@ -// function name: armatak_fnc_extract_auth_token -// function author: Valmo -// function description: Gets the mission params and authenticate on OpenTAKServer API to be able to send HTTP requests - -private _atak_server_instance = missionNamespace getVariable "_atak_server_instance"; -private _atak_server_instance_username = missionNamespace getVariable "_atak_server_instance_username"; -private _atak_server_instance_password = missionNamespace getVariable "_atak_server_instance_password"; -private _authentication = [_atak_server_instance, _atak_server_instance_username, _atak_server_instance_password]; - -_atak_server_instance_token = ("armatak" callExtension ["ots_api:get_auth_token", [_authentication]]) select 0; - -if ((_atak_server_instance_token != "") and !(["ERROR", _atak_server_instance_token, false] call BIS_fnc_inString)) then { - missionNamespace setVariable ["_atak_server_instance_token", _atak_server_instance_token]; - private _warning = format ["ARMATAK
%1", "Authorized"]; - [[_warning, 1.5]] call CBA_fnc_notify; -} else { - missionNamespace setVariable ["_atak_server_instance_token", _atak_server_instance_token]; - private _warning = format ["ARMATAK
%1", "Failed to get Auth Token " + _atak_server_instance_token]; - [[_warning, 1]] call CBA_fnc_notify; -}; - -_atak_server_instance_token \ No newline at end of file