30 if ( player && target_entity )
33 target_entity.GetActionComponentNameList( target.GetComponentIndex(),selections );
35 if ( target_entity && target_entity.GetInventory() && target_entity.GetInventory().AttachmentCount() > 0 )
37 for(
int i = 0; i < selections.Count(); i++ )
40 EntityAI att = target_entity.GetInventory().FindAttachment(target_slot_id);
42 if ( att && player.GetInventory().CanAddEntityIntoHands(att) )
44 if ( att.CanDetachAttachment( target_entity ) && target_entity.CanReleaseAttachment( att ) )
45 return target_slot_id;
56 if (!
GetGame().IsDedicatedServer() )
61 if ( super.SetupAction( player, target, item, action_data, extra_data))
63 if (!
GetGame().IsDedicatedServer())
80 if (
GetGame().IsMultiplayer() &&
GetGame().IsServer() )
return true;
92 return target_entity.GetInventory().FindAttachment(target_slot_id);
119 float stackable = attachment.GetTargetQuantityMax();
120 if( stackable == 0 || stackable >= attachment.GetQuantity() )
123 action_data.
m_Player.PredictiveTakeEntityToHands( attachment );
125 else if( stackable != 0 && stackable < attachment.GetQuantity() )
128 attachment.SplitIntoStackMaxHandsClient( action_data.
m_Player );
142 if ( player && target_entity )
145 target_entity.GetActionComponentNameList( target.GetComponentIndex(),selections );
147 if ( target_entity && target_entity.GetInventory() && target_entity.GetInventory().AttachmentCount() > 0 )
149 for(
int i = 0; i < selections.Count(); i++ )
154 EntityAI att = target_entity.GetInventory().FindAttachment(target_slot_id);
156 if ( att && player.GetInventory().CanAddEntityIntoHands(att) )
158 if ( att.CanDetachAttachment( target_entity ) && target_entity.CanReleaseAttachment( att ) )
159 return target_slot_id;
177 if ( player && target_entity )
180 target_entity.GetActionComponentNameList( target.GetComponentIndex(),selections );
182 if ( target_entity && target_entity.GetInventory() && target_entity.GetInventory().AttachmentCount() > 0 )
184 for(
int i = 0; i < selections.Count(); i++ )
189 EntityAI att = target_entity.GetInventory().FindAttachment(target_slot_id);
191 if ( att && player.GetInventory().CanAddEntityIntoHands(att) )
193 if ( att.CanDetachAttachment( target_entity ) && target_entity.CanReleaseAttachment( att ) )
194 return target_slot_id;
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ClearInventoryReservationEx(ActionData action_data)
ActionDetachFromTarget_SpecificSlot_WoodenPlanks ActionDetachFromTarget_SpecificSlot ActionDetachFromTarget_SpecificSlot_MetalSheets()
ActionDetachFromTarget_SpecificSlotsCategory_Barrel ActionDetachFromTarget_SpecificSlotsCategory ActionDetachFromTarget_SpecificSlotsCategory_WoodenCrate()
ActionDetachFromTarget_SpecificSlotsCategory ActionDetachFromTarget ActionDetachFromTarget_SpecificSlot_WoodenLogs()
ActionDetachFromTarget m_slotToDetach
class ActionTargets ActionTarget
ref ActionTarget m_Target
void ActionDetachFromTarget_SpecificSlot_WoodenPlanks()
void ActionDetachFromTarget_SpecificSlotsCategory_Barrel()
override int FindSlotIdToDetach(PlayerBase player, ActionTarget target, ItemBase item)
int FindSlotIdToDetach(PlayerBase player, ActionTarget target, ItemBase item)
override void OnExecuteServer(ActionData action_data)
void ActionDetachFromTarget()
override ActionData CreateActionData()
override void CreateConditionComponents()
override void OnExecuteClient(ActionData action_data)
override Object GetDisplayInteractObject(PlayerBase player, ActionTarget target)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
void Process(ActionData action_data)
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
const int INVALID
Invalid slot (-1)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()