Added scope param to all draw functions

This commit is contained in:
2026-05-24 16:08:59 -03:00
parent 3a82dba854
commit 167d47e488
5 changed files with 34 additions and 6 deletions

View File

@@ -10,6 +10,7 @@
// 4: Stroke color as signed ARGB int <NUMBER> (default: -1) // 4: Stroke color as signed ARGB int <NUMBER> (default: -1)
// 5: Fill color as signed ARGB int <NUMBER> (default: -1761607681) // 5: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
// 6: Stroke weight <NUMBER> (default: 3) // 6: Stroke weight <NUMBER> (default: 3)
// 7: Optional registration scope <STRING> (default: "")
// //
// Example: // Example:
// [player, 300, "Mortar Risk Area"] call armatak_fnc_draw_circle; // [player, 300, "Mortar Risk Area"] call armatak_fnc_draw_circle;
@@ -23,7 +24,8 @@ params [
["_staleSeconds", 86400, [0]], ["_staleSeconds", 86400, [0]],
["_strokeColor", -1, [0]], ["_strokeColor", -1, [0]],
["_fillColor", -1761607681, [0]], ["_fillColor", -1761607681, [0]],
["_strokeWeight", 3, [0]] ["_strokeWeight", 3, [0]],
["_scope", "", [""]]
]; ];
[ [
@@ -37,5 +39,6 @@ params [
_fillColor, _fillColor,
_strokeWeight, _strokeWeight,
"", "",
"u-d-c-c" "u-d-c-c",
_scope
] call armatak_fnc_draw_ellipse; ] call armatak_fnc_draw_ellipse;

View File

@@ -14,6 +14,7 @@
// 8: Stroke weight <NUMBER> (default: 3) // 8: Stroke weight <NUMBER> (default: 3)
// 9: MilSym SIDC for tactical overlay <STRING> (default: "") // 9: MilSym SIDC for tactical overlay <STRING> (default: "")
// 10: CoT type <STRING> (default: "u-d-c-e") // 10: CoT type <STRING> (default: "u-d-c-e")
// 11: Optional registration scope <STRING> (default: "")
// //
// Example: // Example:
// [screenToWorld [0.5, 0.5], 250, 100, 45, "Support by Fire"] call armatak_fnc_draw_ellipse; // [screenToWorld [0.5, 0.5], 250, 100, 45, "Support by Fire"] call armatak_fnc_draw_ellipse;
@@ -31,7 +32,8 @@ params [
["_fillColor", -1761607681, [0]], ["_fillColor", -1761607681, [0]],
["_strokeWeight", 3, [0]], ["_strokeWeight", 3, [0]],
["_milsym", "", [""]], ["_milsym", "", [""]],
["_cotType", "u-d-c-e", [""]] ["_cotType", "u-d-c-e", [""]],
["_scope", "", [""]]
]; ];
private _position = if (_center isEqualType objNull) then { private _position = if (_center isEqualType objNull) then {
@@ -63,3 +65,6 @@ private _payload = [
]; ];
"armatak" callExtension ["tcp_socket:draw:ellipse", [_payload]]; "armatak" callExtension ["tcp_socket:draw:ellipse", [_payload]];
[_scope, _uuid, _cotType, _realLocation select 0, _realLocation select 1, _realLocation select 2] call armatak_fnc_register_cot;
_uuid

View File

@@ -13,6 +13,7 @@
// 7: Stroke style <STRING> (default: "solid") // 7: Stroke style <STRING> (default: "solid")
// 8: MilSym SIDC for tactical overlay <STRING> (default: "") // 8: MilSym SIDC for tactical overlay <STRING> (default: "")
// 9: CoT type <STRING> (default: "u-d-f") // 9: CoT type <STRING> (default: "u-d-f")
// 10: Optional registration scope <STRING> (default: "")
// //
// Example: // Example:
// [[pos player, screenToWorld [0.5, 0.5]], "Phase Line Blue"] call armatak_fnc_draw_polyline; // [[pos player, screenToWorld [0.5, 0.5]], "Phase Line Blue"] call armatak_fnc_draw_polyline;
@@ -29,7 +30,8 @@ params [
["_strokeWeight", 3, [0]], ["_strokeWeight", 3, [0]],
["_strokeStyle", "solid", [""]], ["_strokeStyle", "solid", [""]],
["_milsym", "", [""]], ["_milsym", "", [""]],
["_cotType", "u-d-f", [""]] ["_cotType", "u-d-f", [""]],
["_scope", "", [""]]
]; ];
if ((count _points) < 2) exitWith {""}; if ((count _points) < 2) exitWith {""};
@@ -76,3 +78,6 @@ private _payload = [
]; ];
"armatak" callExtension ["tcp_socket:draw:free", [_payload]]; "armatak" callExtension ["tcp_socket:draw:free", [_payload]];
[_scope, _uuid, _cotType, _center select 0, _center select 1, _center select 2] call armatak_fnc_register_cot;
_uuid

View File

@@ -13,6 +13,7 @@
// 7: Fill color as signed ARGB int <NUMBER> (default: -1761607681) // 7: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
// 8: Stroke weight <NUMBER> (default: 3) // 8: Stroke weight <NUMBER> (default: 3)
// 9: MilSym SIDC for tactical overlay <STRING> (default: "") // 9: MilSym SIDC for tactical overlay <STRING> (default: "")
// 10: Optional registration scope <STRING> (default: "")
// //
// Example: // Example:
// [screenToWorld [0.5, 0.5], 200, 500, 30, "Engagement Area"] call armatak_fnc_draw_rectangle; // [screenToWorld [0.5, 0.5], 200, 500, 30, "Engagement Area"] call armatak_fnc_draw_rectangle;
@@ -29,7 +30,8 @@ params [
["_strokeColor", -1, [0]], ["_strokeColor", -1, [0]],
["_fillColor", -1761607681, [0]], ["_fillColor", -1761607681, [0]],
["_strokeWeight", 3, [0]], ["_strokeWeight", 3, [0]],
["_milsym", "", [""]] ["_milsym", "", [""]],
["_scope", "", [""]]
]; ];
private _centerPos = if (_center isEqualType objNull) then { private _centerPos = if (_center isEqualType objNull) then {
@@ -87,3 +89,6 @@ private _payload = [
]; ];
"armatak" callExtension ["tcp_socket:draw:rectangle", [_payload]]; "armatak" callExtension ["tcp_socket:draw:rectangle", [_payload]];
[_scope, _uuid, "u-d-r", _centerReal select 0, _centerReal select 1, _centerReal select 2] call armatak_fnc_register_cot;
_uuid

View File

@@ -11,6 +11,7 @@
// 3: Callsign <STRING> (default: "Report") // 3: Callsign <STRING> (default: "Report")
// 4: Remarks <STRING> (default: "") // 4: Remarks <STRING> (default: "")
// 5: Stale time in seconds <NUMBER> (default: 3600) // 5: Stale time in seconds <NUMBER> (default: 3600)
// 6: Optional registration scope <STRING> (default: "")
// //
// Example: // Example:
// [cursorObject, "enemy", "tank", "Enemy Tank", "Reported enemy tank"] call armatak_fnc_report_marker; // [cursorObject, "enemy", "tank", "Enemy Tank", "Reported enemy tank"] call armatak_fnc_report_marker;
@@ -25,13 +26,19 @@ params [
["_kindOrCallsign", "infantry", [""]], ["_kindOrCallsign", "infantry", [""]],
["_callsignOrRemarks", "Report", [""]], ["_callsignOrRemarks", "Report", [""]],
["_remarksOrStaleSeconds", "", ["", 0]], ["_remarksOrStaleSeconds", "", ["", 0]],
["_staleSeconds", 3600, [0]] ["_staleSeconds", 3600, [0, ""]],
["_scope", "", [""]]
]; ];
private _type = ""; private _type = "";
private _callsign = _callsignOrRemarks; private _callsign = _callsignOrRemarks;
private _remarks = _remarksOrStaleSeconds; private _remarks = _remarksOrStaleSeconds;
if (_staleSeconds isEqualType "") then {
_scope = _staleSeconds;
_staleSeconds = 3600;
};
if ((_affiliationOrType select [0, 2]) isEqualTo "a-") then { if ((_affiliationOrType select [0, 2]) isEqualTo "a-") then {
_type = _affiliationOrType; _type = _affiliationOrType;
_callsign = _kindOrCallsign; _callsign = _kindOrCallsign;
@@ -93,3 +100,6 @@ private _payload = [
]; ];
"armatak" callExtension ["tcp_socket:cot:report_marker", [_payload]]; "armatak" callExtension ["tcp_socket:cot:report_marker", [_payload]];
[_scope, _uuid, _type, _realLocation select 0, _realLocation select 1, _realLocation select 2] call armatak_fnc_register_cot;
_uuid