18 if (!
GetGame().IsDedicatedServer() && item)
19 m_Text =
"#attach " + item.GetDisplayName();
24 if (
CanAttachToProxy(player, targetEntity, item, target.GetComponentIndex()))
29 if (targetParentEntity)
31 if (
CanAttachToProxy(player, targetParentEntity, item, target.GetComponentIndex()))
40 if (targetEntity && item)
55 super.OnExecuteClient(action_data);
57 if (action_data.
m_Player.IsPlacingLocal())
59 action_data.
m_Player.TogglePlacingLocal();
AttachActionData ActionData ActionAttach()
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
FindInventoryLocationType
flags for searching locations in inventory
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
void ActionAttachOnProxy()
override void OnExecuteClient(ActionData action_data)
void AttachItem(AttachActionData action_data)
bool CanAttachToProxy(PlayerBase player, EntityAI targetEntity, ItemBase item, int componentIndex=-1)
override void CreateConditionComponents()
ref ActionTarget m_Target
proto native bool CanAddAttachment(notnull EntityAI e)
Check if attachment can be added to any slot.
proto native bool FindFreeLocationFor(notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFreeLocationFor.
script counterpart to engine's class Inventory
DayZPlayerConstants
defined in C++