(repair) - isRepairVehicle handling values according to wiki (#6278)

* handle boolean and integer

* check if value is 1 or true
This commit is contained in:
Cuel 2018-04-27 17:30:03 +02:00 committed by PabstMirror
parent fbacf1a3e4
commit 265bc62259

View File

@ -20,4 +20,6 @@ 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
private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))];
_value in [1, true] // return