ACE3/addons/refuel/functions/fnc_canCheckFuel.sqf

27 lines
631 B
Plaintext
Raw Normal View History

/*
* Author: Jonpas, GitHawk
* Checks if unit can check fuel.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Fuel Source <OBJECT>
*
* Return Value:
* Can Check Fuel <BOOL>
*
* Example:
2015-08-21 20:43:45 +00:00
* [player, truck] call ace_refuel_fnc_canCheckFuel
*
* Public: No
*/
#include "script_component.hpp"
params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]];
!(isNull _unit ||
{!(_unit isKindOf "CAManBase")} ||
{!local _unit} ||
{!alive _source} ||
{([_unit, _source] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE} ||
{(_source call FUNC(getFuel) == REFUEL_INFINITE_FUEL)})