Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionfoldbasebuildingobject.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime( UATimeSpent.DEFAULT_DEPLOY );
6  }
7 }
8 
10 {
12  {
13  m_CallbackClass = ActionFoldBaseBuildingObjectCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18  m_Text = "#fold";
19  }
20 
21  override void CreateConditionComponents()
22  {
25  }
26 
27  override typename GetInputType()
28  {
30  }
31 
32  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
33  {
34  Object targetObject = target.GetObject();
35 
36  if ( targetObject.CanUseConstruction() )
37  {
38  BaseBuildingBase base_building = BaseBuildingBase.Cast( targetObject );
39 
40  if ( base_building.CanFoldBaseBuildingObject() )
41  {
42  return true;
43  }
44  }
45 
46  return false;
47  }
48 
49  override void OnFinishProgressServer( ActionData action_data )
50  {
51  ItemBase item;
52  BaseBuildingBase base_building = BaseBuildingBase.Cast( action_data.m_Target.GetObject() );
53 
54  base_building.CreateConstructionKitInHands(action_data.m_Player);
55  base_building.DestroyConstruction();
56  }
57 
58  override string GetAdminLogMessage(ActionData action_data)
59  {
60  return " folded " + action_data.m_Target.GetObject().GetDisplayName();
61  }
62 }
ItemBase
Definition: inventoryitem.c:730
CCINotPresent
Definition: ccinotpresent.c:1
GetInputType
override GetInputType()
Definition: actionfoldbasebuildingobject.c:27
CAContinuousTime
Definition: cacontinuoustime.c:1
ContinuousInteractActionInput
Definition: actioninput.c:521
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionFoldBaseBuildingObject
ActionFoldBaseBuildingObjectCB ActionContinuousBaseCB ActionFoldBaseBuildingObject()
Definition: actionfoldbasebuildingobject.c:11
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionfoldbasebuildingobject.c:32
UAMaxDistances
Definition: actionconstants.c:104
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
CreateConditionComponents
override void CreateConditionComponents()
Definition: actionfoldbasebuildingobject.c:21
PlayerBase
Definition: playerbaseclient.c:1
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actionfoldbasebuildingobject.c:49
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
GetAdminLogMessage
override string GetAdminLogMessage(ActionData action_data)
Definition: actionfoldbasebuildingobject.c:58
BaseBuildingBase
Definition: fence.c:1
CCTNonRuined
Definition: cctnonruined.c:1
Object
Definition: objecttyped.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionFoldBaseBuildingObjectCB
Definition: actionfoldbasebuildingobject.c:1
ActionContinuousBase
Definition: actioncontinuousbase.c:132
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53