Files
MissionTemplate/framework/vehicleFlags/functions/fn_isClassExcluded.sqf

27 lines
744 B
Plaintext

/*
Used to read vehicle flags config and check provided classname against all present exclusion groups.
Author: IndigoFox
Parameter(s):
0: STRING - Classname of the vehicle to check
*/
if (!hasInterface) exitWith {};
params [["_className", "", [""]]];
if (_className == "") exitWith {false};
private _vehicleFlagsCfg = call milsim_vehicleFlags_fnc_getVehicleFlagsCfg;
private _excludedVehiclesClass = (_vehicleFlagsCfg >> "ExcludedVehicles");
private _exclusionGroups = configProperties [_vehicleFlagsCfg >> "ExcludedVehicles"];
{
// Check if the class doesn't have a flag proxy
private _excludedClasses = _x call BIS_fnc_getCfgDataArray;
if (_className in _excludedClasses) exitWith {true};
} forEach _exclusionGroups;
false;