33 if ( tgt_entity &&
BaseBuildingBase.Cast(tgt_entity) &&!tgt_entity.IsBeingPlaced() )
35 string component_name = tgt_entity.GetActionComponentName( target.GetComponentIndex() );
40 ItemBase attachment =
ItemBase.Cast(tgt_entity.FindAttachmentBySlotName(component_name));
42 if ( attachment && player.GetInventory().CanAddEntityIntoInventory(attachment) && attachment.
IsTakeable() )
62 string component_name = tgt_entity.GetActionComponentName( action_data.m_Target.GetComponentIndex() );
65 if ( tgt_entity &&
ItemBase.CastTo(attachment, tgt_entity.FindAttachmentBySlotName(component_name)) )
68 if ( action_data.m_Player.GetInventory().HasInventoryReservation( attachment, il) )
81 action_data.m_ReservedInventoryLocations.Insert(il);
89 if (
GetGame().IsDedicatedServer())
97 string component_name = tgt_entity.GetActionComponentName( action_data.m_Target.GetComponentIndex() );
100 if ( tgt_entity &&
ItemBase.CastTo(attachment, tgt_entity.FindAttachmentBySlotName(component_name)) )
104 attachment.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
108 float stackable = attachment.GetTargetQuantityMax(il.
GetSlot());
110 if( stackable == 0 || stackable >= attachment.GetQuantity() )
112 action_data.m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
116 attachment.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 CanBeUsedOnBack()
override void CreateConditionComponents()
override bool ActionConditionContinue(ActionData action_data)
override bool HasProneException()
override bool InventoryReservation(ActionData action_data)
void ActionTakeHybridAttachment()
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 IsTakeable()
DayZPlayerConstants
defined in C++
proto native CGame GetGame()