Skip to content

Commit

Permalink
(repair) - isRepairVehicle handling values according to wiki (#6278)
Browse files Browse the repository at this point in the history
* handle boolean and integer

* check if value is 1 or true
  • Loading branch information
Cuel authored and PabstMirror committed Apr 27, 2018
1 parent 364ff54 commit 6e1de1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/repair/functions/fnc_isRepairVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6e1de1e

Please sign in to comment.