mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
f54beb5c86
Added correct hooks for fuel trucks Added code for finding closest hook Cleanup
25 lines
468 B
Plaintext
25 lines
468 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Check if a unit can connect a fuel nozzle
|
|
*
|
|
* Arguments:
|
|
* 0: The unit <OBJECT>
|
|
* 1: The target <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can Connect Nozzle <BOOL>
|
|
*
|
|
* Example:
|
|
* [unit] call ace_refuel_fnc_canConnectNozzle
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
private ["_nozzle"];
|
|
params ["_unit", "_target"];
|
|
|
|
_nozzle = _unit getVariable QGVAR(nozzle);
|
|
|
|
!(isNil "_nozzle" || {(_target distance _unit) > REFUEL_ACTION_DISTANCE})
|