ACE3/addons/refuel/functions/fnc_canCheckFuel.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

27 lines
662 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Jonpas, GitHawk
* Checks if unit can check fuel.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Fuel Source <OBJECT>
*
* Return Value:
* Can Check Fuel <BOOL>
*
* Example:
* [player, truck] call ace_refuel_fnc_canCheckFuel
*
* Public: No
*/
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(getCapacity)) in [REFUEL_INFINITE_FUEL, REFUEL_DISABLED_FUEL]})