mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
9ff5d34ce7
* add isModLoaded cache * add missing brackets * missed one * Update fnc_handlePunjiTrapDamage.sqf * Update fnc_isModLoaded.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com>
28 lines
582 B
Plaintext
28 lines
582 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Glowbal, GhostIsSpooky
|
|
* Check in CfgPatches if modification is loaded
|
|
*
|
|
* Arguments:
|
|
* 0: Mod Name or Classname of the mod in CfgPatches <STRING>
|
|
*
|
|
* Return Value:
|
|
* if modification is loaded <BOOL>
|
|
*
|
|
* Example:
|
|
* ["class"] call ace_common_fnc_isModLoaded
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_modName", "", [""]]];
|
|
|
|
private _return = GVAR(isModLoadedCache) get _modName;
|
|
|
|
if (isNil "_return") then {
|
|
_return = isClass (configFile >> "CfgPatches" >> _modName);
|
|
GVAR(isModLoadedCache) set [_modName, _return];
|
|
};
|
|
|
|
_return
|