mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 13:53:28 +00:00
Added scope param to all draw functions
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
// 4: Stroke color as signed ARGB int <NUMBER> (default: -1)
|
||||
// 5: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||
// 6: Stroke weight <NUMBER> (default: 3)
|
||||
// 7: Optional registration scope <STRING> (default: "")
|
||||
//
|
||||
// Example:
|
||||
// [player, 300, "Mortar Risk Area"] call armatak_fnc_draw_circle;
|
||||
@@ -23,7 +24,8 @@ params [
|
||||
["_staleSeconds", 86400, [0]],
|
||||
["_strokeColor", -1, [0]],
|
||||
["_fillColor", -1761607681, [0]],
|
||||
["_strokeWeight", 3, [0]]
|
||||
["_strokeWeight", 3, [0]],
|
||||
["_scope", "", [""]]
|
||||
];
|
||||
|
||||
[
|
||||
@@ -37,5 +39,6 @@ params [
|
||||
_fillColor,
|
||||
_strokeWeight,
|
||||
"",
|
||||
"u-d-c-c"
|
||||
"u-d-c-c",
|
||||
_scope
|
||||
] call armatak_fnc_draw_ellipse;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// 8: Stroke weight <NUMBER> (default: 3)
|
||||
// 9: MilSym SIDC for tactical overlay <STRING> (default: "")
|
||||
// 10: CoT type <STRING> (default: "u-d-c-e")
|
||||
// 11: Optional registration scope <STRING> (default: "")
|
||||
//
|
||||
// Example:
|
||||
// [screenToWorld [0.5, 0.5], 250, 100, 45, "Support by Fire"] call armatak_fnc_draw_ellipse;
|
||||
@@ -31,7 +32,8 @@ params [
|
||||
["_fillColor", -1761607681, [0]],
|
||||
["_strokeWeight", 3, [0]],
|
||||
["_milsym", "", [""]],
|
||||
["_cotType", "u-d-c-e", [""]]
|
||||
["_cotType", "u-d-c-e", [""]],
|
||||
["_scope", "", [""]]
|
||||
];
|
||||
|
||||
private _position = if (_center isEqualType objNull) then {
|
||||
@@ -63,3 +65,6 @@ private _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
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
// 7: Stroke style <STRING> (default: "solid")
|
||||
// 8: MilSym SIDC for tactical overlay <STRING> (default: "")
|
||||
// 9: CoT type <STRING> (default: "u-d-f")
|
||||
// 10: Optional registration scope <STRING> (default: "")
|
||||
//
|
||||
// Example:
|
||||
// [[pos player, screenToWorld [0.5, 0.5]], "Phase Line Blue"] call armatak_fnc_draw_polyline;
|
||||
@@ -29,7 +30,8 @@ params [
|
||||
["_strokeWeight", 3, [0]],
|
||||
["_strokeStyle", "solid", [""]],
|
||||
["_milsym", "", [""]],
|
||||
["_cotType", "u-d-f", [""]]
|
||||
["_cotType", "u-d-f", [""]],
|
||||
["_scope", "", [""]]
|
||||
];
|
||||
|
||||
if ((count _points) < 2) exitWith {""};
|
||||
@@ -76,3 +78,6 @@ private _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
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
// 7: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||
// 8: Stroke weight <NUMBER> (default: 3)
|
||||
// 9: MilSym SIDC for tactical overlay <STRING> (default: "")
|
||||
// 10: Optional registration scope <STRING> (default: "")
|
||||
//
|
||||
// Example:
|
||||
// [screenToWorld [0.5, 0.5], 200, 500, 30, "Engagement Area"] call armatak_fnc_draw_rectangle;
|
||||
@@ -29,7 +30,8 @@ params [
|
||||
["_strokeColor", -1, [0]],
|
||||
["_fillColor", -1761607681, [0]],
|
||||
["_strokeWeight", 3, [0]],
|
||||
["_milsym", "", [""]]
|
||||
["_milsym", "", [""]],
|
||||
["_scope", "", [""]]
|
||||
];
|
||||
|
||||
private _centerPos = if (_center isEqualType objNull) then {
|
||||
@@ -87,3 +89,6 @@ private _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
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
// 3: Callsign <STRING> (default: "Report")
|
||||
// 4: Remarks <STRING> (default: "")
|
||||
// 5: Stale time in seconds <NUMBER> (default: 3600)
|
||||
// 6: Optional registration scope <STRING> (default: "")
|
||||
//
|
||||
// Example:
|
||||
// [cursorObject, "enemy", "tank", "Enemy Tank", "Reported enemy tank"] call armatak_fnc_report_marker;
|
||||
@@ -25,13 +26,19 @@ params [
|
||||
["_kindOrCallsign", "infantry", [""]],
|
||||
["_callsignOrRemarks", "Report", [""]],
|
||||
["_remarksOrStaleSeconds", "", ["", 0]],
|
||||
["_staleSeconds", 3600, [0]]
|
||||
["_staleSeconds", 3600, [0, ""]],
|
||||
["_scope", "", [""]]
|
||||
];
|
||||
|
||||
private _type = "";
|
||||
private _callsign = _callsignOrRemarks;
|
||||
private _remarks = _remarksOrStaleSeconds;
|
||||
|
||||
if (_staleSeconds isEqualType "") then {
|
||||
_scope = _staleSeconds;
|
||||
_staleSeconds = 3600;
|
||||
};
|
||||
|
||||
if ((_affiliationOrType select [0, 2]) isEqualTo "a-") then {
|
||||
_type = _affiliationOrType;
|
||||
_callsign = _kindOrCallsign;
|
||||
@@ -93,3 +100,6 @@ private _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
|
||||
|
||||
Reference in New Issue
Block a user