10 override void CreateConditionComponents()
16 override bool HasProneException()
21 override typename GetInputType()
26 override bool HasProgress()
35 if ( tgt_entity &&
BaseBuildingBase.Cast(tgt_entity) &&!tgt_entity.IsBeingPlaced() )
37 string component_name = tgt_entity.GetActionComponentName( target.GetComponentIndex() );
39 ItemBase attachment =
ItemBase.Cast(tgt_entity.FindAttachmentBySlotName(component_name));
41 if ( attachment && player.GetInventory().CanAddEntityIntoHands(attachment) && attachment.IsTakeable() )
49 override bool CanContinue(
ActionData action_data )
54 override void OnExecuteClient(
ActionData action_data )
56 OnExecuteImpl(action_data);
59 protected void OnExecuteImpl(
ActionData action_data )
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 float stackable = attachment.GetTargetQuantityMax(-1);
70 if( stackable == 0 || stackable >= attachment.GetQuantity() )
73 action_data.m_Player.PredictiveTakeEntityToHands( attachment );
75 else if( stackable != 0 && stackable < attachment.GetQuantity() )
78 attachment.SplitIntoStackMaxHandsClient( action_data.m_Player );
83 override void OnExecuteServer(
ActionData action_data )
88 OnExecuteImpl(action_data);
91 override void CreateAndSetupActionCallback(
ActionData action_data )
94 string component_name = tgt_entity.GetActionComponentName( action_data.m_Target.GetComponentIndex() );
96 bool heavy_item =
false;
98 if ( tgt_entity &&
ItemBase.CastTo(attachment, tgt_entity.FindAttachmentBySlotName(component_name)) )
101 if ( attachment && attachment.ConfigIsExisting(
"heavyItem") && attachment.ConfigGetBool(
"heavyItem") )
115 Class.CastTo(callback, action_data.m_Player.AddCommandModifier_Action(
DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS,GetCallbackClassTypename()));
122 callback.SetActionData(action_data);
123 callback.InitActionComponent();
124 action_data.m_Callback = callback;