CBA_fnc_inheritsFrom

Description

Checks whether a config entry inherits, directly or indirectly, from another one.

For objects, it is probably simpler to use the isKindOf command.

Parameters

_configClass to check if it is a descendent of _baseConfig [Config]
_baseConfigAncestor config class [Config]

Returns

true if _config is a decendent of _baseConfig [Boolean]

Examples

_rifle = configFile >> "CfgWeapons" >> "m16a4_acg_gl";
_baseRifle = configFile >> "CfgWeapons" >> "RifleCore";
_inherits = [_rifle, _baseRifle] call CBA_fnc_inheritsFrom;
// => true in this case, since all rifles are descended from RifleCore.

Author

Sickboy

Close