mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
f35f80ee82
* Dynamic Add * Support 1.70 Pylon Loadouts * Properly handle old compat pbos - Update RHS Compat * Re-add documentation * cleanup headers (note from other pr) * Cleanup * Fix var spelling
32 lines
692 B
Plaintext
32 lines
692 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Checks if unit can read supply counter. [Only for GVAR(supply) > 0]
|
|
*
|
|
* Arguments:
|
|
* 0: Ammo Truck <OBJECT>
|
|
* 1: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can read supply counter <BOOL>
|
|
*
|
|
* Example:
|
|
* [ammo_truck, player] call ace_rearm_fnc_canReadSupplyCounter
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params [
|
|
["_truck", objNull, [objNull]],
|
|
["_unit", objNull, [objNull]]
|
|
];
|
|
|
|
(alive _unit)
|
|
&& {_unit isKindOf "CAManBase"}
|
|
&& {local _unit}
|
|
&& {alive _truck}
|
|
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
|
&& {GVAR(supply) > 0}
|
|
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
|
|