59 if ( constrution_part )
61 return "#dismantle" +
" " + constrution_part.
GetName();
75 if ( player.IsPlacingLocal() )
79 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
93 Construction construction = base_building.GetConstruction();
112 if ( super.SetupAction( player, target, item, action_data, extra_data ) )
124 switch ( item.Type() )
143 if ( player && !player.IsPlacingLocal() && !player.IsPlacingServer() )
145 Object target_object = target.GetObject();
147 if ( target_object && target_object.CanUseConstruction() )
150 if (
Class.
CastTo(target_entity,target_object) && (target_entity.FindAttachmentBySlotName(
"Att_CombinationLock") || target_entity.FindAttachmentBySlotName(
"Material_FPole_Flag")) )
155 string part_name = target_object.GetActionComponentName( target.GetComponentIndex() );
158 Construction construction = base_building.GetConstruction();
159 ConstructionPart construction_part = construction.GetConstructionPartToDismantle( part_name, item );
161 if ( construction_part )
174 bool checked =
false;
176 if ( construction_part.
IsBase() )
179 if ( !checked && base_building.
IsPlayerInside( player, part_name ) && !player.GetInputController().CameraIsFreeLook() )
215 string message =
string.Format(
"Dismantled %1 from %2 with %3", construction_part.
GetName(), action_data.
m_Target.GetObject().GetDisplayName(), action_data.
m_MainItem.GetDisplayName() );
const int AT_DISMANTLE_PART
protected float m_SpecialtyWeight
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
protected bool m_FullBody
protected int m_StanceMask
class ActionTargets ActionTarget
void Construction(BaseBuildingBase parent)
protected ActionData m_ActionData
ref CABase m_ActionComponent
ref ActionTarget m_Target
float SetCallbackDuration(ItemBase item)
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override bool CanBeUsedLeaning()
override bool ActionConditionContinue(ActionData action_data)
override void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
protected void SetBuildingAnimation(ItemBase item)
override string GetAdminLogMessage(ActionData action_data)
override void CreateConditionComponents()
protected bool DismantleCondition(PlayerBase player, ActionTarget target, ItemBase item, bool camera_check)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
void ActionDismantlePart()
override bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
override string GetText()
protected int m_CommandUID
protected m_CallbackClass
override bool IsFacingCamera(string selection)
override bool IsPlayerInside(PlayerBase player, string selection)
Super root of all classes in Enforce script.
ConstructionPart GetTargetPart()
void SetTargetPart(ConstructionPart target_part)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
const float BASEBUILDING_DECONSTRUCT_SLOW
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.