ACE3/addons/fastroping/functions/fnc_canPrepareFRIES.sqf

25 lines
622 B
Plaintext
Raw Normal View History

/*
* Author: BaerMitUmlaut
* Checks if the unit can prepare the helicopters FRIES.
*
* Arguments:
2015-12-01 19:48:20 +00:00
* 0: The helicopter itself <OBJECT>
*
* Return Value:
* Able to prepare FRIES <BOOL>
*
* Example:
* [_vehicle] call ace_fastroping_fnc_canPrepareFRIES
*
* Public: No
*/
#include "script_component.hpp"
2015-12-01 19:48:20 +00:00
params ["_vehicle"];
2016-02-28 23:34:14 +00:00
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
2016-03-07 17:27:12 +00:00
((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) &&
2015-12-14 20:40:15 +00:00
{(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} &&
2016-03-07 17:27:12 +00:00
{getText (_config >> QGVAR(onPrepare)) != ""}