Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionpackshelter.c
Go to the documentation of this file.
2 {
4  {
5  m_CallbackClass = ActionPackTentCB;
7  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DEPLOY_2HD;
8  m_FullBody = true;
9  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
10  m_Text = "#pack_tent";
11  }
12 
13  override void CreateConditionComponents()
14  {
16  m_ConditionItem = new CCINone();
17  }
18 
19  override typename GetInputType()
20  {
22  }
23  override bool HasProgress()
24  {
25  return true;
26  }
27 
28  override bool HasAlternativeInterrupt()
29  {
30  return true;
31  }
32 
33  override bool ActionConditionContinue(ActionData action_data)
34  {
35  return true;
36  }
37 
38  override ActionData CreateActionData()
39  {
40  PlaceObjectActionData action_data = new PlaceObjectActionData();
41  return action_data;
42  }
43 
44  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
45  {
46  if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
47  return false;
48 
49  Object targetObject = target.GetObject();
50  if (targetObject)
51  {
52  ShelterBase shelter = ShelterBase.Cast(targetObject);
53  return shelter && shelter.CanBePacked();
54  }
55 
56  return false;
57  }
58 
59  override void OnStart(ActionData action_data)
60  {
61  super.OnStart(action_data);
62 
63  action_data.m_Player.TryHideItemInHands(true);
64  }
65 
66  override void OnEnd(ActionData action_data)
67  {
68  super.OnEnd(action_data);
69 
70  action_data.m_Player.TryHideItemInHands(false);
71  }
72 
73  override void OnFinishProgressServer(ActionData action_data)
74  {
75  ShelterBase shelter = ShelterBase.Cast(action_data.m_Target.GetObject());
76  if (shelter)
77  shelter.Deconstruct();
78  }
79 
80  override string GetAdminLogMessage(ActionData action_data)
81  {
82  return " packed " + action_data.m_Target.GetObject().GetDisplayName() + " with Hands ";
83  }
84 }
ItemBase
Definition: inventoryitem.c:730
ActionDeconstructShelter
Definition: actionpackshelter.c:1
ContinuousInteractActionInput
Definition: actioninput.c:521
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionPackTentCB
Definition: actionpacktent.c:1
CCINone
Definition: ccinone.c:1
UAMaxDistances
Definition: actionconstants.c:104
eBrokenLegs
eBrokenLegs
Definition: ebrokenlegs.c:1
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ShelterBase
Definition: shelter.c:100
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
PlaceObjectActionData
Definition: actiondeploybase.c:1
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
Object
Definition: objecttyped.c:1
CCTCursor
Definition: cctcursor.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
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