mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
20 lines
431 B
Plaintext
20 lines
431 B
Plaintext
/*
|
|
* Author: commy2
|
|
*
|
|
* Check if a unit can attach a specific item.
|
|
*
|
|
* Argument:
|
|
* 0: Unit that wants to attach the object (Object)
|
|
* 1: Name of the attachable item (String)
|
|
*
|
|
* Return value:
|
|
* Boolean (Bool)
|
|
*/
|
|
|
|
private ["_unit", "_item"];
|
|
|
|
_unit = _this select 0;
|
|
_item = _this select 1;
|
|
|
|
canStand _unit && {_unit getVariable ["AGM_AttachedItemName", ""] == ""} && {_item in (magazines _unit + items _unit + [""])}
|