Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actionhandspartswitch.c
Go to the documentation of this file.
1
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 {
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}
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
proto native CGame GetGame()