Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionfoldobject.c
Go to the documentation of this file.
2 {
3  void ActionFoldObject()
4  {
6  m_Text = "#fold";
7  }
8 
9  override typename GetInputType()
10  {
12  }
13 
14  override bool HasProgress()
15  {
16  return false;
17  }
18 
19  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
20  {
21  Object targetObject = target.GetObject();
22  if ( targetObject.IsInherited(HescoBox) )
23  {
24  HescoBox hesco = HescoBox.Cast( targetObject );
25 
26  if ( hesco.GetState() == HescoBox.UNFOLDED )
27  {
28  return true;
29  }
30  }
31  return false;
32  }
33 
34  override void OnExecuteServer( ActionData action_data )
35  {
36  Object targetObject = action_data.m_Target.GetObject();
37  HescoBox hesco = HescoBox.Cast( targetObject );
38  if ( hesco.GetState() == HescoBox.UNFOLDED )
39  {
40  hesco.Fold();
41  }
42 
43  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
44  }
45 };
ItemBase
Definition: inventoryitem.c:730
ContinuousInteractActionInput
Definition: actioninput.c:521
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionFoldObject
Definition: actionfoldobject.c:1
ActionInteractBase
Definition: actioninteractbase.c:54
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
Object
Definition: objecttyped.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68