36 if ( tgt_item && !tgt_item.
IsTakeable() )
return false;
37 if ( tgt_item && tgt_item.IsBeingPlaced() )
return false;
44 if ( tgt_entity && tgt_entity.IsItemBase() && player.GetInventory().CanAddEntityIntoInventory(tgt_entity) && tgt_entity.GetHierarchyRootPlayer() != player )
46 if ( tgt_parent && (!tgt_item.
CanDetachAttachment(tgt_parent) || !tgt_parent.CanReleaseAttachment(tgt_item)) )
106 if ( action_data.
m_Player.GetInventory().HasInventoryReservation( targetItem, il) )
134 ntarget.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
138 float stackable = ntarget.GetTargetQuantityMax(il.
GetSlot());
140 if( stackable == 0 || stackable >= ntarget.GetQuantity() )
142 action_data.
m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
147 ntarget.SplitIntoStackMaxToInventoryLocationClient( il );
159 ntarget.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
163 float stackable = ntarget.GetTargetQuantityMax(il.
GetSlot());
165 if( stackable == 0 || stackable >= ntarget.GetQuantity() )
167 action_data.
m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
171 ntarget.SplitIntoStackMaxToInventoryLocationClient( il );
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ClearInventoryReservationEx(ActionData action_data)
class ActionTargets ActionTarget
FindInventoryLocationType
flags for searching locations in inventory
ref array< ref InventoryLocation > m_ReservedInventoryLocations
ref ActionTarget m_Target
override bool CanBeUsedOnBack()
override bool ActionConditionContinue(ActionData action_data)
override void OnExecuteServer(ActionData action_data)
override void CreateConditionComponents()
override bool InventoryReservation(ActionData action_data)
override void OnExecuteClient(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasProneException()
protected int m_CommandUIDProne
protected int m_CommandUID
script counterpart to engine's class Inventory
const int c_InventoryReservationTimeoutMS
reservations
proto native int GetSlot()
returns slot id if current type is Attachment
override bool IsTakeable()
override bool CanDetachAttachment(EntityAI parent)
DayZPlayerConstants
defined in C++
proto native CGame GetGame()