mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
39 lines
918 B
Plaintext
39 lines
918 B
Plaintext
/*
|
|
* Author: Ruthberg
|
|
* Checks whether a given configuration name appears in the inheritance tree of a specific configuration entry.
|
|
*
|
|
* Arguments:
|
|
* 0: configEntry (CONFIG)
|
|
* 1: configname (STING)
|
|
*
|
|
* Return Value:
|
|
* BOOLEAN
|
|
*
|
|
* Public: Yes
|
|
*
|
|
* Note: Not to be confused with the inheritsFrom scripting command.
|
|
*
|
|
* Deprecated
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY");
|
|
|
|
params ["_configEntry", "_configMatch"];
|
|
|
|
if (configName _configEntry == _configMatch) exitWith {true};
|
|
if (configName _configEntry == ",") exitWith {false};
|
|
|
|
private "_match";
|
|
_match = false;
|
|
|
|
while {configName _configEntry != ""} do {
|
|
if (configName _configEntry == _configMatch) exitWith {
|
|
_match = true;
|
|
};
|
|
|
|
_configEntry = inheritsFrom _configEntry;
|
|
};
|
|
|
|
_match
|