diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index d447c3f6514..57b57dcf22d 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -60,7 +60,7 @@ if (!hasInterface) exitWith {}; }, true] call CBA_fnc_addPlayerEventHandler; // - Duty factors ------------------------------------------------------------- - if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { + if (["ace_medical"] call EFUNC(common,isModLoaded)) then { [QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1 linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true]; }] call FUNC(addDutyFactor); @@ -68,7 +68,7 @@ if (!hasInterface) exitWith {}; linearConversion [6, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 6]), 1, 2, true]; }] call FUNC(addDutyFactor); }; - if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then { + if (["ace_dragging"] call EFUNC(common,isModLoaded)) then { [QEGVAR(dragging,isCarrying), { [1, 3] select (_this getVariable [QEGVAR(dragging,isCarrying), false]); }] call FUNC(addDutyFactor); diff --git a/addons/common/functions/fnc_isModLoaded.sqf b/addons/common/functions/fnc_isModLoaded.sqf index fb7b1807b69..b070b39b38c 100644 --- a/addons/common/functions/fnc_isModLoaded.sqf +++ b/addons/common/functions/fnc_isModLoaded.sqf @@ -4,24 +4,17 @@ * Check in CfgPatches if modification is loaded * * Arguments: - * 0: Mod Name or Classname of the mod in CfgPatches + * 0: Classname of the mod in CfgPatches * * Return Value: - * if modification is loaded + * If modification is loaded * * Example: - * ["class"] call ace_common_fnc_isModLoaded + * "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 +GVAR(isModLoadedCache) getOrDefaultCall [toLowerANSI _modName, {isClass (configFile >> "CfgPatches" >> _modName)}, true] diff --git a/addons/compat_sog/functions/fnc_handlePunjiTrapTrigger.sqf b/addons/compat_sog/functions/fnc_handlePunjiTrapTrigger.sqf index 17ed92a172a..d2e9abdbbcb 100644 --- a/addons/compat_sog/functions/fnc_handlePunjiTrapTrigger.sqf +++ b/addons/compat_sog/functions/fnc_handlePunjiTrapTrigger.sqf @@ -15,7 +15,7 @@ * Public: No */ params ["_trap"]; -if (!(["ACE_Medical"] call EFUNC(common,isModLoaded))) exitWith {}; +if (!(["ace_medical"] call EFUNC(common,isModLoaded))) exitWith {}; private _radius = getNumber (configOf _trap >> "indirectHitRange"); private _affectedUnits = _trap nearEntities ["CAManBase", _radius]; diff --git a/addons/csw/functions/fnc_assemble_deployTripod.sqf b/addons/csw/functions/fnc_assemble_deployTripod.sqf index 2d292a52c35..d3317a4e40f 100644 --- a/addons/csw/functions/fnc_assemble_deployTripod.sqf +++ b/addons/csw/functions/fnc_assemble_deployTripod.sqf @@ -53,7 +53,7 @@ [_player, "PutDown"] call EFUNC(common,doGesture); // drag after deploying - if ((missionNamespace getVariable [QGVAR(dragAfterDeploy), false]) && {["ACE_dragging"] call EFUNC(common,isModLoaded)}) then { + if ((missionNamespace getVariable [QGVAR(dragAfterDeploy), false]) && {["ace_dragging"] call EFUNC(common,isModLoaded)}) then { if ([_player, _cswTripod] call EFUNC(dragging,canCarry)) then { TRACE_1("starting carry",_cswTripod); [_player, _cswTripod] call EFUNC(dragging,startCarry); diff --git a/addons/csw/functions/fnc_staticWeaponInit.sqf b/addons/csw/functions/fnc_staticWeaponInit.sqf index 6ffd170d47b..6dcbbf52e61 100644 --- a/addons/csw/functions/fnc_staticWeaponInit.sqf +++ b/addons/csw/functions/fnc_staticWeaponInit.sqf @@ -89,7 +89,7 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then { _ammoActionPath = [_typeOf, 0, ["ACE_MainActions"], _ammoAction] call EFUNC(interact_menu,addActionToClass); }; - if (["ACE_reload"] call EFUNC(common,isModLoaded)) then { + if (["ace_reload"] call EFUNC(common,isModLoaded)) then { // move reload's check ammo action to the ammo handling point (remove and re-add) [_typeOf, 0, ["ACE_MainActions", QEGVAR(reload,CheckAmmo)]] call EFUNC(interact_menu,removeActionFromClass); private _checkAmmoAction = [QGVAR(checkAmmo), localize ELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); diff --git a/addons/dogtags/XEH_postInit.sqf b/addons/dogtags/XEH_postInit.sqf index 6653d802116..f683f6f2530 100644 --- a/addons/dogtags/XEH_postInit.sqf +++ b/addons/dogtags/XEH_postInit.sqf @@ -7,7 +7,7 @@ // Add actions and event handlers only if ace_medical is loaded // - Adding actions via config would create a dependency -if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { +if (["ace_medical"] call EFUNC(common,isModLoaded)) then { if (hasInterface) then { private _checkTagAction = [ "ACE_CheckDogtag", @@ -47,7 +47,7 @@ if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { }; // If the arsenal is loaded, show the custom names for dog tags when in the arsenal -if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then { +if (["ace_arsenal"] call EFUNC(common,isModLoaded)) then { [QEGVAR(arsenal,rightPanelFilled), { params ["_display", "_leftPanelIDC", "_rightPanelIDC"]; diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index 13d08f833be..7ff3444b7dc 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -71,7 +71,7 @@ private _suitCoef = if ((uniform ACE_player) != "") then { private _gBlackOut = MAXVIRTUALG / _classCoef + MAXVIRTUALG / _suitCoef - MAXVIRTUALG; // Unconsciousness -if ((_average > _gBlackOut) && {["ACE_Medical"] call EFUNC(common,isModLoaded) && {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then { +if ((_average > _gBlackOut) && {["ace_medical"] call EFUNC(common,isModLoaded) && {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then { [ACE_player, true, (10 + floor(random 5)), true] call EFUNC(medical,setUnconscious); }; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index cc87f492d70..bba3cffd4dd 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -110,14 +110,14 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { _strength = _strength * _losCoefficient; // Add ace_hearing ear ringing sound effect - if (["ACE_Hearing"] call EFUNC(common,isModLoaded) && {_strength > 0 && {EGVAR(hearing,damageCoefficent) > 0.25}}) then { + if (["ace_hearing"] call EFUNC(common,isModLoaded) && {_strength > 0 && {EGVAR(hearing,damageCoefficent) > 0.25}}) then { private _earringingStrength = 40 * _strength; [_earringingStrength] call EFUNC(hearing,earRinging); TRACE_1("Earringing Strength",_earringingStrength); }; // add ace_medical pain effect: - if (["ACE_Medical"] call EFUNC(common,isModLoaded) && {_strength > 0.1}) then { + if (["ace_medical"] call EFUNC(common,isModLoaded) && {_strength > 0.1}) then { [ACE_player, _strength / 2] call EFUNC(medical,adjustPainLevel); }; diff --git a/addons/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf index 2f75baa929f..9cef418eceb 100644 --- a/addons/killtracker/XEH_postInit.sqf +++ b/addons/killtracker/XEH_postInit.sqf @@ -19,7 +19,7 @@ if ((getText (missionconfigfile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith { TRACE_1("no mission debriefing config",_this); }; -if (!(["ACE_Medical"] call EFUNC(common,isModLoaded))) exitWith { +if (!(["ace_medical"] call EFUNC(common,isModLoaded))) exitWith { WARNING("No ACE-Medical"); XGVAR(outputText) = "No ACE-Medical"; }; diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 53620da7b2e..a36eb8bd562 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -53,7 +53,7 @@ if (_distance < _backblastRange) then { [_damage * 100] call BIS_fnc_bloodEffect; - if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { + if (["ace_medical"] call EFUNC(common,isModLoaded)) then { [_unit, _damage, "body", "backblast", _unit] call EFUNC(medical,addDamageToUnit); } else { _unit setDamage (damage _unit + _damage); diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index 2fd0c0f7e54..812a2ab7ea2 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -57,7 +57,7 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); [_damage * 100] call BIS_fnc_bloodEffect; }; - if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { + if (["ace_medical"] call EFUNC(common,isModLoaded)) then { [_x, _damage, "body", "backblast", _firer] call EFUNC(medical,addDamageToUnit); } else { _x setDamage (damage _x + _damage); diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf index f2be4a3838b..7378cae65e9 100644 --- a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -33,7 +33,7 @@ if (_activated && local _logic) then { }; if (_error == "") then { - if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then { + if (["ace_arsenal"] call EFUNC(common,isModLoaded)) then { if (!isPlayer _unit || {player == _unit}) then { [{ diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index a05dc65d509..f66ca9132da 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -21,7 +21,7 @@ params ["_logic"]; if !(local _logic) exitWith {}; -if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { +if !(["ace_medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); } else { private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 8ff9b4a731d..1f982129357 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -21,7 +21,7 @@ params ["_logic"]; if !(local _logic) exitWith {}; -if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { +if !(["ace_medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); } else { private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index e3051f98249..e8189b377e6 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -21,7 +21,7 @@ params ["_logic"]; if !(local _logic) exitWith {}; -if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { +if !(["ace_medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); } else { private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]);