add exclusion whitelist for known vehicle models w/out flag proxies

This commit is contained in:
2024-01-07 19:28:38 -08:00
parent bc9b20a89d
commit 0301758e28

View File

@@ -85,6 +85,16 @@ private _appliedParentClasses = [
"Helicopter" "Helicopter"
]; ];
private _modelsWithoutFlagProxies = [
"TF373_SOAR_MH47G_Base", // MH-47G Chinook
"RHS_MELB_base", // MELB AH-6M/MH-6M/H-6M Little Bird
"USAF_C17", // C17 Globemaster III
"USAF_C130J", // C130J Super Hercules
"USAF_AC130U", // AC130 Spooky II
"ej_UH60M_base", // UH-60M Black Hawk + DAP variants
"rhsusf_fmtv_base" // M1083A1P2 variants + SOV SOCOM variants
];
{ {
private _parentClass = _x; private _parentClass = _x;
[_parentClass, "InitPost", { [_parentClass, "InitPost", {
@@ -94,7 +104,22 @@ private _appliedParentClasses = [
"Set Vehicle Flag", // displayed title "Set Vehicle Flag", // displayed title
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon "\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
{true}, // statement {true}, // statement
{true}, // condition {
params ["_target", "_player", "_params"];
private _modelsWithoutFlagProxies = _params select 1;
// check if hierarchy includes any of the models without flag proxies
private _excluded = false;
{
if (_excluded) exitWith {false};
_excluded = _target isKindOf _x;
} forEach _modelsWithoutFlagProxies;
if (_excluded) exitWith {false};
// check if vehicle is alive
alive _target;
}, // condition
{ {
params ["_target", "_player", "_params"]; params ["_target", "_player", "_params"];
private _flagActionID = _params#0; private _flagActionID = _params#0;
@@ -155,7 +180,7 @@ private _appliedParentClasses = [
_actions; _actions;
}, // child code }, // child code
[_flagActionID], // params [_flagActionID, _modelsWithoutFlagProxies], // params
nil, // position nil, // position
4, // distance 4, // distance
[false, false, false, false, false], // other params [false, false, false, false, false], // other params
@@ -180,7 +205,10 @@ private _appliedParentClasses = [
params ["_target", "_player", "_params"]; params ["_target", "_player", "_params"];
_target forceFlagTexture ""; _target forceFlagTexture "";
}, // statement }, // statement
{true}, // condition {
params ["_target", "_player", "_params"];
alive _target && getForcedFlagTexture _target != "";
}, // condition
nil // child code nil // child code
] call ace_interact_menu_fnc_createAction; ] call ace_interact_menu_fnc_createAction;