2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
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
|
|
|
|
*/
|
|
|
|
|
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} ||
|
2023-02-17 02:06:11 +00:00
|
|
|
{(_source call FUNC(getCapacity)) in [REFUEL_INFINITE_FUEL, REFUEL_DISABLED_FUEL]})
|