8 string m_ItemName =
"";
17 override void CreateConditionComponents()
23 override bool HasProneException()
28 override bool ActionConditionContinue(
ActionData action_data )
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)) )
55 override bool CanBeUsedOnBack()
96 override bool InventoryReservation(
ActionData action_data)
103 if (
ItemBase.CastTo(targetItem, action_data.m_Target.GetObject()) )
106 if ( action_data.m_Player.GetInventory().HasInventoryReservation( targetItem, il) )
112 action_data.m_Player.GetInventory().AddInventoryReservationEx( targetItem, il,
GameInventory.c_InventoryReservationTimeoutMS);
119 action_data.m_ReservedInventoryLocations.Insert(il);
125 override void OnExecuteServer(
ActionData action_data )
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 );
153 override void OnExecuteClient(
ActionData action_data )
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 );