mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
removed old function, will have to refactor everything
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
class CfgCommands {
|
|
||||||
allowedHTMLLoadURIs[] += {
|
|
||||||
"http://localhost:3000/ping*"
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -5,27 +5,9 @@ class CfgFunctions {
|
|||||||
file = "\armatak\armatak\armatak_main\functions\fn_init.sqf";
|
file = "\armatak\armatak\armatak_main\functions\fn_init.sqf";
|
||||||
};
|
};
|
||||||
|
|
||||||
class extract_callsign {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_callsign.sqf";
|
|
||||||
};
|
|
||||||
class extract_role {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_role.sqf";
|
|
||||||
};
|
|
||||||
class extract_side {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_side.sqf";
|
|
||||||
};
|
|
||||||
class extract_info {
|
class extract_info {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_info.sqf";
|
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_info.sqf";
|
||||||
};
|
};
|
||||||
class extract_drone_info {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_drone_info.sqf";
|
|
||||||
};
|
|
||||||
class extract_uuid {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_uuid.sqf";
|
|
||||||
};
|
|
||||||
class extract_auth_token {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_auth_token.sqf";
|
|
||||||
};
|
|
||||||
|
|
||||||
class convert_location {
|
class convert_location {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_location.sqf";
|
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_location.sqf";
|
||||||
@@ -39,16 +21,6 @@ class CfgFunctions {
|
|||||||
class convert_to_vr {
|
class convert_to_vr {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
||||||
};
|
};
|
||||||
|
|
||||||
class postMarkers {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_postMarkers.sqf";
|
|
||||||
};
|
|
||||||
class postMarkersDebug {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_postMarkersDebug.sqf";
|
|
||||||
};
|
|
||||||
class deleteMarkers {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_deleteMarkers.sqf";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -16,6 +16,5 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgCommands.hpp"
|
|
||||||
#include "CfgFunctions.hpp"
|
#include "CfgFunctions.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
params["_marker"];
|
|
||||||
|
|
||||||
"armatak" callExtension ["markers:delete", _marker call armatak_fnc_extract_info];
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
params["_markers"];
|
|
||||||
|
|
||||||
"armatak" callExtension ["markers:post", [_markers]];
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
params["_markers"];
|
|
||||||
|
|
||||||
"armatak" callExtension ["markers:post_debug", [markers]];
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
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 ["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 ["<t color='#2B7319'>ARMATAK</t><br/> %1", "Authorized"];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
} else {
|
|
||||||
missionNamespace setVariable ["_atak_server_instance_token", _atak_server_instance_token];
|
|
||||||
|
|
||||||
private _warning = format ["<t color='#FF0000'>ARMATAK</t><br/> %1", "Failed to get Auth Token " + _atak_server_instance_token];
|
|
||||||
[[_warning, 1]] call CBA_fnc_notify;
|
|
||||||
};
|
|
||||||
|
|
||||||
_atak_server_instance_token
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
params["_unit"];
|
|
||||||
|
|
||||||
private _callsign = "";
|
|
||||||
|
|
||||||
if (roleDescription _unit != "") then {
|
|
||||||
_callsign = name _unit + " | " + roleDescription _unit;
|
|
||||||
} else {
|
|
||||||
_callsign = name _unit;
|
|
||||||
};
|
|
||||||
|
|
||||||
_callsign
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
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 = _drone getVariable "_atak_uav_callsign";
|
|
||||||
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
|
|
||||||
@@ -5,24 +5,11 @@
|
|||||||
params["_unit"];
|
params["_unit"];
|
||||||
private _location = (getPos _unit) call armatak_fnc_convert_location;
|
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_latitude = _location select 0;
|
||||||
private _atak_longitude = _location select 1;
|
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_altitude = _location select 2;
|
||||||
private _atak_server_instance = missionNamespace getVariable "_atak_server_instance";
|
private _atak_bearing = parseNumber ((getDir _unit) toFixed 0);
|
||||||
private _atak_server_instance_token = missionNamespace getVariable "_atak_server_instance_token";
|
|
||||||
|
|
||||||
_drone = vehicle (getConnectedUAVUnit _unit);
|
_unit_info = [_atak_latitude,_atak_longitude,_atak_altitude,_atak_bearing];
|
||||||
|
|
||||||
if (!isNull _drone) then {
|
|
||||||
_drone setVariable ["_atak_uav_connected", true];
|
|
||||||
_drone setVariable ["_atak_uav_callsign", "[UAV]" + name _unit];
|
|
||||||
};
|
|
||||||
|
|
||||||
_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
|
_unit_info
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
params["_unit"];
|
|
||||||
|
|
||||||
private _affiliation = "f";
|
|
||||||
private _type = "G";
|
|
||||||
private _role = "a-f-G-U-C-I";
|
|
||||||
|
|
||||||
switch (side _unit) do {
|
|
||||||
case "WEST": {
|
|
||||||
_affiliation = "f";
|
|
||||||
};
|
|
||||||
case "EAST": {
|
|
||||||
_affiliation = "h";
|
|
||||||
};
|
|
||||||
case "INDEPENDENT": {
|
|
||||||
_affiliation = "n";
|
|
||||||
};
|
|
||||||
case "CIVILIAN": {
|
|
||||||
_affiliation = "u";
|
|
||||||
};
|
|
||||||
default {
|
|
||||||
_affiliation = "f";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
_unit_type = _unit call BIS_fnc_objectType select 1;
|
|
||||||
|
|
||||||
switch (_unit_type) do {
|
|
||||||
case "AT": {
|
|
||||||
_type = "G-U-C-F-R";
|
|
||||||
};
|
|
||||||
case "Civilian": {
|
|
||||||
_type = "G-E-V-C";
|
|
||||||
};
|
|
||||||
case "Diver": {
|
|
||||||
_type = "U-S";
|
|
||||||
};
|
|
||||||
case "Infantry": {
|
|
||||||
_type = "G-U-C-I";
|
|
||||||
};
|
|
||||||
case "Medic": {
|
|
||||||
_type = "a-f-G-U-C";
|
|
||||||
};
|
|
||||||
case "MG": {
|
|
||||||
_type = "G-U-C-I";
|
|
||||||
};
|
|
||||||
case "Officer": {
|
|
||||||
_type = "G-U-C-I";
|
|
||||||
};
|
|
||||||
case "Pilot": {
|
|
||||||
_type = "G-U-C-V";
|
|
||||||
};
|
|
||||||
case "Sniper": {
|
|
||||||
_type = "G-U-C-R-X";
|
|
||||||
};
|
|
||||||
case "SpecialForces": {
|
|
||||||
_type = "G-U-C-R-X";
|
|
||||||
};
|
|
||||||
case "UAVPilot": {
|
|
||||||
_type = "G-U-C-V-U";
|
|
||||||
};
|
|
||||||
default {
|
|
||||||
_type = "G-U-C-I";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!isNull vehicle _unit) then {
|
|
||||||
_vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
|
|
||||||
|
|
||||||
switch (_vehicle_type) do {
|
|
||||||
case "Car": {
|
|
||||||
_type = "G-U-C-I-M";
|
|
||||||
};
|
|
||||||
case "Helicopter": {
|
|
||||||
_type = "A-M-H";
|
|
||||||
};
|
|
||||||
case "Motorcycle": {
|
|
||||||
_type = "G-U-C-I-M";
|
|
||||||
};
|
|
||||||
case "Plane": {
|
|
||||||
_type = "A-M-F";
|
|
||||||
};
|
|
||||||
case "Ship": {
|
|
||||||
_type = "S";
|
|
||||||
};
|
|
||||||
case "StaticWeapon": {
|
|
||||||
_type = "G-U-C-F-M";
|
|
||||||
};
|
|
||||||
case "Submarine": {
|
|
||||||
_type = "U-S";
|
|
||||||
};
|
|
||||||
case "TrackedAPC": {
|
|
||||||
_type = "G-U-C-I-I";
|
|
||||||
};
|
|
||||||
case "Tank": {
|
|
||||||
_type = "G-U-C-A-T";
|
|
||||||
};
|
|
||||||
case "WheeledAPC": {
|
|
||||||
_type = "G-U-C-I-Z";
|
|
||||||
};
|
|
||||||
default {};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
_role = "a-" + _affiliation + "-" + _type;
|
|
||||||
|
|
||||||
_role
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
params["_unit"];
|
|
||||||
|
|
||||||
_uuid = _unit getVariable "_atak_uid";
|
|
||||||
|
|
||||||
if (isNil "_uuid") then {
|
|
||||||
_uuid = "armatak" callExtension ["uuid", []] select 0;
|
|
||||||
_unit setVariable ["_atak_uid", _uuid];
|
|
||||||
};
|
|
||||||
|
|
||||||
_uuid
|
|
||||||
Reference in New Issue
Block a user