2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-02-22 13:40:04 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Equips the given helicopter with a FRIES.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The helicopter <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_vehicle] call ace_fastroping_fnc_equipFRIES
|
|
|
|
*
|
2019-04-25 18:31:36 +00:00
|
|
|
* Public: Yes
|
2016-02-22 13:40:04 +00:00
|
|
|
*/
|
2020-06-14 19:30:28 +00:00
|
|
|
|
2016-02-22 13:40:04 +00:00
|
|
|
params ["_vehicle"];
|
|
|
|
|
2017-09-19 20:38:49 +00:00
|
|
|
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
2016-02-22 13:40:04 +00:00
|
|
|
if !(isNumber (_config >> QGVAR(enabled))) then {
|
2020-06-14 19:30:28 +00:00
|
|
|
["%1 has not been configured for ACE_Fastroping.", getText (_config >> "displayName")] call BIS_fnc_error;
|
2016-02-22 13:40:04 +00:00
|
|
|
} else {
|
|
|
|
if (getNumber (_config >> QGVAR(enabled)) == 2) then {
|
2017-09-19 20:38:49 +00:00
|
|
|
private _fries = (getText (_config >> QGVAR(friesType))) createVehicle [0, 0, 0];
|
2020-06-14 19:30:28 +00:00
|
|
|
_fries attachTo [_vehicle, getArray (_config >> QGVAR(friesAttachmentPoint))];
|
2016-02-22 13:40:04 +00:00
|
|
|
_vehicle setVariable [QGVAR(FRIES), _fries, true];
|
|
|
|
};
|
|
|
|
};
|