mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
14e92dfb7f
* Add enable setting * Optimize eden expressions Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * Add debug * Update addons/repair/functions/fnc_addRepairActions.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Fix strange indent * Optimize bool to number conversion Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Prevent run before setting is ready * Move postInit to EH * remove all transportRepair = 0 * remove requiredAddons --------- Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
31 lines
720 B
Plaintext
31 lines
720 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Glowbal
|
|
* Check if vehicle is a engineering vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: Vehicle <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Is engineering vehicle <BOOL>
|
|
*
|
|
* Example:
|
|
* cursorObject call ace_repair_fnc_isRepairVehicle
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params ["_vehicle"];
|
|
TRACE_1("params",_vehicle);
|
|
|
|
if (_vehicle isKindOf "CAManBase") exitWith {false};
|
|
|
|
private _config = configOf _vehicle;
|
|
private _canRepair = getNumber (_config >> QGVAR(canRepair));
|
|
if (_canRepair == 0) then {
|
|
_canRepair = getNumber (_config >> "transportRepair");
|
|
};
|
|
// Value can be integer or boolean
|
|
private _value = _vehicle getVariable ["ACE_isRepairVehicle", _canRepair > 0];
|
|
_value in [1, true] // return
|