Repair/UI - Minor code cleanup (#9879)

This commit is contained in:
johnb432 2024-03-28 14:11:26 +01:00 committed by GitHub
parent 46cc49dc1e
commit 48bdc6fbcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,7 @@
["CBA_settingsInitialized", {
if !GVAR(enabled) exitWith {};
if (!GVAR(enabled)) exitWith {};
[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;

View File

@ -19,9 +19,8 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace;
["ace_infoDisplayChanged", {
// Selective UI Advanced
// Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified
private _force = [true, false] select (GVAR(allowSelectiveUI));
{
[_x, missionNamespace getVariable (format [QGVAR(%1), _x]), false, _force] call FUNC(setAdvancedElement);
[_x, missionNamespace getVariable (format [QGVAR(%1), _x]), false, !GVAR(allowSelectiveUI)] call FUNC(setAdvancedElement);
} forEach (allVariables GVAR(configCache));
// Execute local event for when it's safe to modify UI through this API