mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #4782 from Dystopian/simplify_class_crawling
Simplify config crawling in nouniformrestrictions
This commit is contained in:
commit
e94ca3fab9
@ -18,19 +18,15 @@
|
|||||||
private _modifyClasses = [];
|
private _modifyClasses = [];
|
||||||
private _baseClasses = [];
|
private _baseClasses = [];
|
||||||
{
|
{
|
||||||
if ((_x >> "modelSides") in (configProperties [_x, "true", false])) then {
|
private _baseClass = inheritsFrom _x;
|
||||||
private _modifyClass = {
|
_modifyClasses pushBackUnique [_x, _baseClass];
|
||||||
if (!isNull (_x >> "modelSides")) exitWith {_x};
|
|
||||||
} forEach (configHierarchy _x);
|
|
||||||
private _baseClass = inheritsFrom _modifyClass;
|
|
||||||
_modifyClasses pushBackUnique [_modifyClass, _baseClass];
|
|
||||||
if !(_baseClass in (_modifyClasses apply {_x select 0})) then {
|
if !(_baseClass in (_modifyClasses apply {_x select 0})) then {
|
||||||
_baseClasses pushBackUnique _baseClass;
|
_baseClasses pushBackUnique _baseClass;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
false
|
false
|
||||||
} count (
|
} count (
|
||||||
("!isNull (_x >> 'modelSides') &&" +
|
("!isNull (_x >> 'modelSides') &&" +
|
||||||
|
"{(_x >> 'modelSides') in (configProperties [_x, 'true', false])} &&" +
|
||||||
"{!(getArray (_x >> 'modelSides') isEqualTo [6])} &&" +
|
"{!(getArray (_x >> 'modelSides') isEqualTo [6])} &&" +
|
||||||
"{!(getArray (_x >> 'modelSides') isEqualTo [0,1,2,3])}")
|
"{!(getArray (_x >> 'modelSides') isEqualTo [0,1,2,3])}")
|
||||||
configClasses (configFile >> "CfgVehicles")
|
configClasses (configFile >> "CfgVehicles")
|
||||||
|
Loading…
Reference in New Issue
Block a user