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() )
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 );
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") )
122 callback.SetActionData(action_data);
123 callback.InitActionComponent();
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ClearInventoryReservationEx(ActionData action_data)
class ActionTargets ActionTarget
ref ActionTarget m_Target
override void OnExecuteServer(ActionData action_data)
override bool CanContinue(ActionData action_data)
protected void OnExecuteImpl(ActionData action_data)
override bool HasProgress()
override void CreateConditionComponents()
override void OnExecuteClient(ActionData action_data)
void ActionTakeHybridAttachmentToHands()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateAndSetupActionCallback(ActionData action_data)
override bool HasProneException()
protected int m_CommandUIDProne
protected GetCallbackClassTypename()
protected int m_CommandUID
Super root of all classes in Enforce script.
override bool IsTakeable()
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.