2015-08-13 17:33:55 +00:00
|
|
|
/*
|
|
|
|
* Author: GitHawk
|
2015-08-20 20:10:26 +00:00
|
|
|
* Disconnect a fuel nozzle.
|
2015-08-13 17:33:55 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-20 20:10:26 +00:00
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Nozzle <OBJECT>
|
2015-08-13 17:33:55 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-14 01:18:54 +00:00
|
|
|
* None
|
2015-08-13 17:33:55 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-08-21 20:43:45 +00:00
|
|
|
* [player, nozzle] call ace_refuel_fnc_disconnect
|
2015-08-13 17:33:55 +00:00
|
|
|
*
|
2015-08-14 01:18:54 +00:00
|
|
|
* Public: No
|
2015-08-13 17:33:55 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-02-02 14:03:06 +00:00
|
|
|
params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]];
|
2015-08-13 17:33:55 +00:00
|
|
|
|
2016-02-02 14:03:06 +00:00
|
|
|
private _sink = _nozzle getVariable [QGVAR(sink), objNull];
|
2015-08-20 20:10:26 +00:00
|
|
|
if (isNull _sink) exitWith {};
|
2015-08-13 17:33:55 +00:00
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
_sink setVariable [QGVAR(nozzle), nil, true];
|
2017-09-16 09:36:42 +00:00
|
|
|
if (_nozzle isKindOf "Land_CanisterFuel_F") then { _nozzle setVariable [QEGVAR(cargo,canLoad), true, true]; };
|
2017-09-10 19:43:03 +00:00
|
|
|
_nozzle setVariable [QGVAR(sink), nil, true];
|
2015-08-22 11:34:24 +00:00
|
|
|
_nozzle setVariable [QGVAR(isConnected), false, true];
|
|
|
|
[objNull, _nozzle, true] call FUNC(dropNozzle);
|
2015-08-13 17:33:55 +00:00
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
[_unit, _nozzle] call FUNC(takeNozzle);
|