2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-07-03 21:14:23 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
2015-08-16 18:14:54 +00:00
|
|
|
* Check if vehicle is a engineering vehicle.
|
2015-07-03 21:14:23 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-16 18:14:54 +00:00
|
|
|
* 0: Vehicle <OBJECT>
|
2015-07-03 21:14:23 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2015-08-16 18:14:54 +00:00
|
|
|
* Is engineering vehicle <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2023-07-29 04:53:05 +00:00
|
|
|
* cursorObject call ace_repair_fnc_isRepairVehicle
|
2015-07-03 21:14:23 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
2015-08-09 06:54:44 +00:00
|
|
|
params ["_vehicle"];
|
|
|
|
TRACE_1("params",_vehicle);
|
2015-07-03 21:14:23 +00:00
|
|
|
|
2015-11-10 02:11:48 +00:00
|
|
|
if (_vehicle isKindOf "CAManBase") exitWith {false};
|
2015-07-03 21:14:23 +00:00
|
|
|
|
2023-07-29 04:53:05 +00:00
|
|
|
private _config = configOf _vehicle;
|
|
|
|
private _canRepair = getNumber (_config >> QGVAR(canRepair));
|
|
|
|
if (_canRepair == 0) then {
|
|
|
|
_canRepair = getNumber (_config >> "transportRepair");
|
|
|
|
};
|
2018-04-27 15:30:03 +00:00
|
|
|
// Value can be integer or boolean
|
2023-07-29 04:53:05 +00:00
|
|
|
private _value = _vehicle getVariable ["ACE_isRepairVehicle", _canRepair > 0];
|
2018-04-27 15:30:03 +00:00
|
|
|
_value in [1, true] // return
|