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>
|
2017-09-10 19:43:03 +00:00
|
|
|
* 1: Fuel Source <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"
|
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
params [["_unit", objNull, [objNull]], ["_source", 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} ||
|
2017-09-10 19:43:03 +00:00
|
|
|
{!alive _source} ||
|
|
|
|
{([_unit, _source] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE} ||
|
|
|
|
{(_source call FUNC(getFuel) == REFUEL_INFINITE_FUEL)})
|