38 if (tgtItem && tgtItem.IsBeingPlaced())
44 if (tgtEntity && (!tgtParent || tgtParent.CanUseConstruction()))
46 if (tgtEntity && tgtEntity.IsItemBase() && player.GetInventory().CanAddEntityIntoInventory(tgtEntity) && tgtEntity.GetHierarchyRootPlayer() != player)
48 if (tgtParent && (!tgtItem.
CanDetachAttachment(tgtParent) || !tgtParent.CanReleaseAttachment(tgtItem)))
77 if ( action_data.
m_Player.GetInventory().HasInventoryReservation( targetItem, il) )
98 if (
g_Game.IsDedicatedServer())
108 ntarget.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
114 float stackable = ntarget.GetTargetQuantityMax(il.
GetSlot());
116 if( stackable == 0 || stackable >= ntarget.GetQuantity() )
118 action_data.
m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
123 ntarget.SplitIntoStackMaxToInventoryLocationClient( il );
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ClearInventoryReservationEx(ActionData action_data)
void ClearActionJuncture(ActionData action_data)
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
FindInventoryLocationType
flags for searching locations in inventory
ref ActionTarget m_Target
ref array< ref InventoryLocation > m_ReservedInventoryLocations
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)
bool CanDetachCodeLock(notnull PlayerBase player, int componentIndex)
Condition check called from ActionTakeItem and ActionTakeItemToHands.
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++