From e516c281d3df06db585397216ad0d985501304a0 Mon Sep 17 00:00:00 2001 From: Cuel Date: Mon, 16 Apr 2018 16:03:43 +0200 Subject: [PATCH 1/2] handle boolean and integer --- addons/repair/functions/fnc_isRepairVehicle.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index f18ff0cd3e5..1a6dd792aaf 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -20,4 +20,5 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; -((_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]) > 0); +// Value can be integer or boolean +([false, true] select (_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))])) // return From 0167d90c5d786cfe8ed1a3056f7660f3fdbc90f7 Mon Sep 17 00:00:00 2001 From: Cuel Date: Fri, 27 Apr 2018 12:48:07 +0200 Subject: [PATCH 2/2] check if value is 1 or true --- addons/repair/functions/fnc_isRepairVehicle.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 1a6dd792aaf..ff3ac7ed1c2 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -21,4 +21,5 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; // Value can be integer or boolean -([false, true] select (_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))])) // return +private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]; +_value in [1, true] // return