mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
730 B
Plaintext
26 lines
730 B
Plaintext
/**
|
|
* fn_inheritsFrom.sqf
|
|
* @Descr: Checks whether a given configuration name appears in the inheritance tree of a specific configuration entry.
|
|
* @Author: Ruthberg
|
|
*
|
|
* @Arguments: [configEntry CONFIG, configname STRING]
|
|
* @Return: BOOL
|
|
* @PublicAPI: true
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_configEntry","_configMatch", "_match"];
|
|
_configEntry = _this select 0;
|
|
_configMatch = _this select 1;
|
|
|
|
if (configName _configEntry == _configMatch) exitWith { true };
|
|
if (configName _configEntry == ",") exitWith { false };
|
|
|
|
_match = false;
|
|
while {configName _configEntry != ""} do {
|
|
if (configName _configEntry == _configMatch) exitWith { _match = true };
|
|
_configEntry = inheritsFrom(_configEntry);
|
|
};
|
|
|
|
_match |