Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionnextcombinationlockdial.c
Go to the documentation of this file.
2 {
4  {
5  m_Text = "#next_combination_lock_dial";
6  }
7 
8  override void CreateConditionComponents()
9  {
12  }
13 
14  override bool HasTarget()
15  {
16  return false;
17  }
18 
19  override bool IsInstant()
20  {
21  return true;
22  }
23 
24  override bool RemoveForceTargetAfterUse()
25  {
26  return false;
27  }
28 
29  override bool UseAcknowledgment()
30  {
31  return true;
32  }
33 
34  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
35  {
36  if ( item.IsInherited( CombinationLock ) )
37  {
38  ConstructionActionData construction_action_data = player.GetConstructionActionData();
39  construction_action_data.SetCombinationLock( CombinationLock.Cast( item ) );
40 
41  return true;
42  }
43 
44  return false;
45  }
46 
47  override void Start( ActionData action_data )
48  {
49  super.Start( action_data );
50 
51  //set next dial
52  CombinationLock combination_lock = CombinationLock.Cast( action_data.m_MainItem );
53  if ( combination_lock )
54  {
55  combination_lock.SetNextDial();
56  }
57  }
58 }
ItemBase
Definition: inventoryitem.c:730
ConstructionActionData
Definition: constructionactiondata.c:1
CombinationLock
Definition: combinationlock4.c:1
ActionNextCombinationLockDial
Definition: actionnextcombinationlockdial.c:1
CCTNone
Definition: cctnone.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
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
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56