2015-08-20 17:51:22 +00:00
|
|
|
/*
|
|
|
|
* Author: GitHawk
|
|
|
|
* Check if a unit can store ammo in an ammo truck.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Target <OBJECT>
|
|
|
|
* 1: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Can Store Ammo <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, tank] call ace_rearm_fnc_canStoreAmmo
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-02-01 19:05:53 +00:00
|
|
|
params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
|
2015-08-20 17:51:22 +00:00
|
|
|
|
|
|
|
!(isNull _unit ||
|
|
|
|
{!(_unit isKindOf "CAManBase")} ||
|
|
|
|
{!local _unit} ||
|
|
|
|
{(_target distance _unit) > REARM_ACTION_DISTANCE} ||
|
|
|
|
{isNull (_unit getVariable [QGVAR(dummy), objNull])})
|