Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionnextcombinationlockdialontarget.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 IsInstant()
15  {
16  return true;
17  }
18 
19  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
20  {
21  if (!target.GetObject())
22  return false;
23 
24  CombinationLock lock = CombinationLock.Cast( target.GetObject() );
25  if ( lock && lock.GetHierarchyParent() && Fence.Cast(lock.GetHierarchyParent()) )
26  {
27  ConstructionActionData construction_action_data = player.GetConstructionActionData();
28  construction_action_data.SetCombinationLock( lock );
29 
30  return true;
31  }
32 
33  return false;
34  }
35 
36  override void Start( ActionData action_data )
37  {
38  super.Start( action_data );
39 
40  //set next dial
41  ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
42  CombinationLock combination_lock = construction_action_data.GetCombinationLock();
43  if ( combination_lock )
44  {
45  combination_lock.SetNextDial();
46  }
47  }
48 }
ItemBase
Definition: inventoryitem.c:730
ConstructionActionData
Definition: constructionactiondata.c:1
CombinationLock
Definition: combinationlock4.c:1
CCINone
Definition: ccinone.c:1
UAMaxDistances
Definition: actionconstants.c:104
ActionInteractBase
Definition: actioninteractbase.c:54
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
CCTNonRuined
Definition: cctnonruined.c:1
ActionNextCombinationLockDialOnTarget
Definition: actionnextcombinationlockdialontarget.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56