mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 13:43:46 +00:00
linted uas callsing functions
This commit is contained in:
@@ -5,29 +5,34 @@
|
|||||||
params["_unit"];
|
params["_unit"];
|
||||||
|
|
||||||
private _callsign = "";
|
private _callsign = "";
|
||||||
|
private _displayName = localize (getText (configOf _unit >> "displayName"));
|
||||||
|
|
||||||
|
if (_displayName isEqualTo "") then {
|
||||||
|
_displayName = typeOf _unit;
|
||||||
|
};
|
||||||
|
|
||||||
if ((([_unit] call BIS_fnc_objectType) select 0) == "Vehicle") then {
|
if ((([_unit] call BIS_fnc_objectType) select 0) == "Vehicle") then {
|
||||||
_callsign = getText (configOf _unit >> "displayName");
|
_callsign = _displayName;
|
||||||
|
|
||||||
if (!isNull driver _unit) then {
|
if (!isNull driver _unit) then {
|
||||||
_callsign = getText (configOf _unit >> "displayName") + " | " + ([name (driver _unit)] call armatak_fnc_shorten_name);
|
_callsign = _displayName + " | " + ([name (driver _unit)] call armatak_fnc_shorten_name);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (unitIsUAV _unit) then {
|
if (unitIsUAV _unit) then {
|
||||||
_callsign = getText (configOf _unit >> "displayName");
|
_callsign = _displayName;
|
||||||
|
|
||||||
if (isUAVConnected _unit) then {
|
if (isUAVConnected _unit) then {
|
||||||
_callsign = (_callsign) + "[ON]";
|
_callsign = _callsign + " [ON]";
|
||||||
} else {
|
} else {
|
||||||
_callsign = (_callsign) + "[OFF]";
|
_callsign = _callsign + " [OFF]";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
armatak_attribute_marker_callsign = _unit getVariable "armatak_attribute_marker_callsign";
|
private _markerCallsignOverride = _unit getVariable ["armatak_attribute_marker_callsign", ""];
|
||||||
|
|
||||||
if (!isNil "armatak_attribute_marker_callsign" or armatak_attribute_marker_callsign != '') then {
|
if (_markerCallsignOverride isNotEqualTo "") then {
|
||||||
_callsign = armatak_attribute_marker_callsign;
|
_callsign = _markerCallsignOverride;
|
||||||
};
|
};
|
||||||
|
|
||||||
_callsign
|
_callsign
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ if (side _unit == east) then {
|
|||||||
_callsign = getText (configOf _unit >> "displayName");
|
_callsign = getText (configOf _unit >> "displayName");
|
||||||
};
|
};
|
||||||
|
|
||||||
armatak_attribute_unit_callsign = _unit getVariable "armatak_attribute_unit_callsign";
|
private _unitCallsignOverride = _unit getVariable ["armatak_attribute_unit_callsign", ""];
|
||||||
|
|
||||||
if (!isNil "armatak_attribute_unit_callsign" or armatak_attribute_unit_callsign != '') then {
|
if (_unitCallsignOverride isNotEqualTo "") then {
|
||||||
_callsign = armatak_attribute_unit_callsign;
|
_callsign = _unitCallsignOverride;
|
||||||
};
|
};
|
||||||
|
|
||||||
_callsign
|
_callsign
|
||||||
|
|||||||
Reference in New Issue
Block a user