change root level folder name to framework, update resupply+vehicleflags
tested locally
This commit is contained in:
26
framework/vehicleFlags/functions/fn_isClassExcluded.sqf
Normal file
26
framework/vehicleFlags/functions/fn_isClassExcluded.sqf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
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;
|
||||
Reference in New Issue
Block a user