Skip to content

Commit

Permalink
Repair/UI - Minor code cleanup (#9879)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 authored Mar 28, 2024
1 parent 46cc49d commit 48bdc6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/repair/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions addons/ui/XEH_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48bdc6f

Please sign in to comment.