bugfixing
This commit is contained in:
@@ -6,21 +6,30 @@
|
||||
Parameter(s):
|
||||
0: STRING - Classname of the vehicle to check
|
||||
*/
|
||||
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
params [["_className", "", [""]]];
|
||||
if (_className == "") exitWith {false};
|
||||
|
||||
private _vehicleFlagsCfg = call milsim_vehicleFlags_fnc_getVehicleFlagsCfg;
|
||||
private _vehicleFlagsCfg = call FUNC(getVehicleFlagsCfg);
|
||||
private _excludedVehiclesClass = (_vehicleFlagsCfg >> "ExcludedVehicles");
|
||||
private _exclusionGroups = configProperties [_vehicleFlagsCfg >> "ExcludedVehicles"];
|
||||
|
||||
private _isExcluded = false;
|
||||
{
|
||||
// Check if the class doesn't have a flag proxy
|
||||
// Check if the class is directly excluded
|
||||
private _excludedClasses = _x call BIS_fnc_getCfgDataArray;
|
||||
if (_className in _excludedClasses) exitWith {true};
|
||||
if (_className in _excludedClasses) exitWith {
|
||||
_isExcluded = true;
|
||||
};
|
||||
{
|
||||
if (_className isKindOf _x) exitWith {
|
||||
_isExcluded = true;
|
||||
};
|
||||
} forEach _excludedClasses;
|
||||
if (_isExcluded) exitWith {};
|
||||
} forEach _exclusionGroups;
|
||||
|
||||
false;
|
||||
_isExcluded;
|
||||
|
||||
Reference in New Issue
Block a user