Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionhandspartswitch.c
Go to the documentation of this file.
1 // deprecated
3 {
5  {
6  }
7 
8  override void CreateConditionComponents()
9  {
10  m_ConditionItem = new CCINone; //'CCINotPresent' to perfom with empty hands only
12  m_Text = "#switch_to_the_next_part";
13  }
14 
15  override bool IsInstant()
16  {
17  return true;
18  }
19 
20  override typename GetInputType()
21  {
22  return InteractActionInput;
23  }
24 
25  override bool RemoveForceTargetAfterUse()
26  {
27  return false;
28  }
29 
30  override bool UseAcknowledgment()
31  {
32  return true;
33  }
34 
35  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
36  {
37  return false;
38  }
39 
40  //-------------------------------------------------
41  override void OnStartClient(ActionData action_data)
42  {
43  super.OnStartClient( action_data );
44 
45  SetNextIndex(action_data);
46  }
47 
48  override void OnStartServer(ActionData action_data)
49  {
50  super.OnStartServer( action_data );
51 
52  if (!GetGame().IsMultiplayer())
53  SetNextIndex(action_data);
54  }
55 
56  void SetNextIndex(ActionData action_data)
57  {
58  ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
59  construction_action_data.SetNextIndex();
60  }
61 }
ItemBase
Definition: inventoryitem.c:730
GetGame
proto native CGame GetGame()
ConstructionActionData
Definition: constructionactiondata.c:1
CCINone
Definition: ccinone.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
InteractActionInput
Definition: actioninput.c:534
ActionHandsPartSwitch
Definition: actionhandspartswitch.c:2
CCTCursor
Definition: cctcursor.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
ActionSingleUseBase
Definition: actionsingleusebase.c:41
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56