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)) )
103 if (
ItemBase.CastTo(targetItem, action_data.m_Target.GetObject()) )
106 if ( action_data.m_Player.GetInventory().HasInventoryReservation( targetItem, il) )
119 action_data.m_ReservedInventoryLocations.Insert(il);
127 if (
GetGame().IsDedicatedServer())
137 ntarget.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
143 float stackable = ntarget.GetTargetQuantityMax(il.
GetSlot());
145 if( stackable == 0 || stackable >= ntarget.GetQuantity() )
147 action_data.m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
152 ntarget.SplitIntoStackMaxToInventoryLocationClient( il );
class ActionTargets ActionTarget
FindInventoryLocationType
flags for searching locations in inventory
void ClearActionJuncture(ActionData action_data)
ref CCIBase m_ConditionItem
void ClearInventoryReservationEx(ActionData action_data)
ref CCTBase m_ConditionTarget
void ActionInteractBase()
override bool HasProneException()
override void CreateConditionComponents()
override bool CanBeUsedOnBack()
override bool ActionConditionContinue(ActionData action_data)
override bool InventoryReservation(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnExecute(ActionData action_data)
const int c_InventoryReservationTimeoutMS
reservations
script counterpart to engine's class Inventory
proto native int GetSlot()
returns slot id if current type is Attachment
override bool CanDetachAttachment(EntityAI parent)
override bool IsTakeable()
DayZPlayerConstants
defined in C++
proto native CGame GetGame()