2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-09-18 19:12:40 +00:00
|
|
|
/*
|
2022-01-30 17:56:20 +00:00
|
|
|
* Author: Glowbal, GhostIsSpooky
|
|
|
|
* Check in CfgPatches if modification is loaded
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-18 19:12:40 +00:00
|
|
|
* Arguments:
|
2022-01-30 17:56:20 +00:00
|
|
|
* 0: Mod Name or Classname of the mod in CfgPatches <STRING>
|
2015-09-18 19:12:40 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* if modification is loaded <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* ["class"] call ace_common_fnc_isModLoaded
|
|
|
|
*
|
2015-09-18 19:12:40 +00:00
|
|
|
* Public: Yes
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
|
2015-12-12 16:26:47 +00:00
|
|
|
params [["_modName", "", [""]]];
|
2015-09-20 14:40:49 +00:00
|
|
|
|
2022-01-30 17:56:20 +00:00
|
|
|
private _return = GVAR(isModLoadedCache) get _modName;
|
|
|
|
|
|
|
|
if (isNil "_return") then {
|
|
|
|
_return = isClass (configFile >> "CfgPatches" >> _modName);
|
|
|
|
GVAR(isModLoadedCache) set [_modName, _return];
|
|
|
|
};
|
|
|
|
|
|
|
|
_return
|