2015-08-16 23:57:05 +00:00
|
|
|
/*
|
2015-08-17 22:42:35 +00:00
|
|
|
* Author: Jonpas, GitHawk
|
2015-08-16 23:57:05 +00:00
|
|
|
* Checks if unit can check fuel.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
2015-08-20 20:10:26 +00:00
|
|
|
* 1: Fuel Truck/Station <OBJECT>
|
2015-08-16 23:57:05 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Can Check Fuel <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-08-21 20:43:45 +00:00
|
|
|
* [player, truck] call ace_refuel_fnc_canCheckFuel
|
2015-08-16 23:57:05 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-02-02 14:03:06 +00:00
|
|
|
params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]];
|
2015-08-16 23:57:05 +00:00
|
|
|
|
2015-08-17 22:42:35 +00:00
|
|
|
!(isNull _unit ||
|
|
|
|
{!(_unit isKindOf "CAManBase")} ||
|
|
|
|
{!local _unit} ||
|
2015-08-18 21:18:32 +00:00
|
|
|
{!alive _target} ||
|
2015-08-17 22:42:35 +00:00
|
|
|
{(_target distance _unit) > REFUEL_ACTION_DISTANCE} ||
|
2015-08-18 21:18:32 +00:00
|
|
|
{(_target call FUNC(getFuel) == REFUEL_INFINITE_FUEL)})
|