2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-02-18 04:37:04 +00:00
|
|
|
/*
|
|
|
|
* Author: marc_book
|
|
|
|
* Tests if unit can refuel the target UAV
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Player <OBJECT>
|
|
|
|
* 1: UAV <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Can the player rechange the UAV <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, theUAV] call ace_logistics_uavbattery_fnc_canRefuelUAV
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-28 20:29:43 +00:00
|
|
|
|
2015-08-15 22:07:17 +00:00
|
|
|
params ["_caller", "_target"];
|
2015-01-28 20:29:43 +00:00
|
|
|
|
2024-07-02 09:16:48 +00:00
|
|
|
(alive _target) && {"ACE_UAVBattery" in (_caller call EFUNC(common,uniqueItems))} && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4}
|