2015-09-19 20:27:23 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg
|
|
|
|
* Checks whether a given configuration name appears in the inheritance tree of a specific configuration entry.
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-19 20:27:23 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: configEntry (CONFIG)
|
|
|
|
* 1: configname (STING)
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* BOOLEAN
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*
|
|
|
|
* Note: Not to be confused with the inheritsFrom scripting command.
|
|
|
|
*
|
|
|
|
* Deprecated
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-21 20:09:54 +00:00
|
|
|
ACE_DEPRECATED("ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY");
|
2015-09-21 19:25:18 +00:00
|
|
|
|
2015-09-19 20:27:23 +00:00
|
|
|
params ["_configEntry", "_configMatch"];
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-09-19 20:27:23 +00:00
|
|
|
if (configName _configEntry == _configMatch) exitWith {true};
|
|
|
|
if (configName _configEntry == ",") exitWith {false};
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-09-19 20:27:23 +00:00
|
|
|
private "_match";
|
2015-01-16 23:21:47 +00:00
|
|
|
_match = false;
|
2015-09-19 20:27:23 +00:00
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
while {configName _configEntry != ""} do {
|
2015-09-19 20:27:23 +00:00
|
|
|
if (configName _configEntry == _configMatch) exitWith {
|
|
|
|
_match = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
_configEntry = inheritsFrom _configEntry;
|
2015-01-16 23:21:47 +00:00
|
|
|
};
|
|
|
|
|
2015-09-19 20:27:23 +00:00
|
|
|
_match
|