Skip to content

Commit

Permalink
simplify condition if ace repair isn't loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkIsGrim committed Jan 20, 2024
1 parent 8bf3968 commit e57bb8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/attributes/initAttributes.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ if (isClass (configFile >> "CfgPatches" >> "ace_medical")) then {
] call FUNC(addAttribute);
};

private _hasAceRepair = isClass (configFile >> "CfgPatches" >> "ace_repair");
[
"Traits",
"str_b_engineer_f0",
Expand All @@ -1006,10 +1007,10 @@ if (isClass (configFile >> "CfgPatches" >> "ace_medical")) then {
} forEach call EFUNC(common,getSelectedUnits);
},
{_entity getUnitTrait "engineer"},
{!(missionNamespace getVariable ["ace_repair_enabled", false])}
[{true}, {!(missionNamespace getVariable ["ace_repair_enabled", false])}] select _hasAceRepair
] call FUNC(addAttribute);

if (isClass (configFile >> "CfgPatches" >> "ace_repair")) then {
if (_hasAceRepair) then {
[
"Traits",
LSTRING(EngineeringSkill),
Expand Down

0 comments on commit e57bb8c

Please sign in to comment.