Skip to content

Commit

Permalink
Improve conditions for Engine and Lights attributes (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
ampersand38 authored Mar 24, 2023
1 parent d6f8e15 commit 31c2d4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/attributes/initAttributes.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
} forEach call EFUNC(common,getSelectedVehicles);
},
{isEngineOn _entity},
{alive _entity && {_entity isKindOf "LandVehicle" || {_entity isKindOf "Air"} || {_entity isKindOf "Ship"}}}
{alive _entity && {getNumber (configOf _entity >> "fuelCapacity") > 0} && {_entity isKindOf "LandVehicle" || {_entity isKindOf "Air"} || {_entity isKindOf "Ship"}}}
] call FUNC(addAttribute);

[
Expand All @@ -182,7 +182,7 @@
} forEach call EFUNC(common,getSelectedVehicles);
},
{isLightOn _entity},
{alive _entity && {_entity isKindOf "LandVehicle" || {_entity isKindOf "Air"} || {_entity isKindOf "Ship"}}}
{alive _entity && {"true" configClasses (configOf _entity >> "Reflectors") isNotEqualTo []} && {_entity isKindOf "LandVehicle" || {_entity isKindOf "Air"} || {_entity isKindOf "Ship"}}}
] call FUNC(addAttribute);

[
Expand Down

0 comments on commit 31c2d4a

Please sign in to comment.