From b2b8c808150aadfe0770834dfd761f964d95caec Mon Sep 17 00:00:00 2001 From: Steve Zhao Date: Wed, 22 Mar 2023 18:44:44 -0400 Subject: [PATCH 1/2] conditions for engine and lights attributes --- addons/attributes/initAttributes.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/attributes/initAttributes.sqf b/addons/attributes/initAttributes.sqf index 94613aaf5..4875e6530 100644 --- a/addons/attributes/initAttributes.sqf +++ b/addons/attributes/initAttributes.sqf @@ -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); [ @@ -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); [ From ea35a7e3c5af2f488cef0598a0fe8bfed4b8836f Mon Sep 17 00:00:00 2001 From: Steve Zhao Date: Thu, 23 Mar 2023 14:22:07 -0400 Subject: [PATCH 2/2] remove unneeded () --- addons/attributes/initAttributes.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/attributes/initAttributes.sqf b/addons/attributes/initAttributes.sqf index 4875e6530..af31dffb6 100644 --- a/addons/attributes/initAttributes.sqf +++ b/addons/attributes/initAttributes.sqf @@ -182,7 +182,7 @@ } forEach call EFUNC(common,getSelectedVehicles); }, {isLightOn _entity}, - {alive _entity && {("true" configClasses (configOf _entity >> "Reflectors")) isNotEqualTo []} && {_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); [