Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondialcombinationlock.c
Go to the documentation of this file.
2 {
3  private const float REPEAT_AFTER_SEC = 0.5;
4 
5  override void CreateActionComponent()
6  {
7  m_ActionData.m_ActionComponent = new CAContinuousRepeat(REPEAT_AFTER_SEC);
8  }
9 }
10 
12 {
14  {
15  m_CallbackClass = ActionDialCombinationLockCB;
16  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENITEM;
17  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_OPENITEM;
19  m_Text = "#dial_combination_lock";
20  }
21 
22  override void CreateConditionComponents()
23  {
24  m_ConditionTarget = new CCTNone();
26  }
27 
28  override bool HasProneException()
29  {
30  return true;
31  }
32 
33  override bool HasTarget()
34  {
35  return false;
36  }
37 
38  override void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
39  {
40  ConstructionActionData constructionActionData = player.GetConstructionActionData();
41  m_Text = "#dial_combination_lock " + constructionActionData.GetDialNumberText();
42  }
43 
44  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
45  {
46  if (item.IsInherited(CombinationLock))
47  {
48  ConstructionActionData constructionActionData = player.GetConstructionActionData();
49  constructionActionData.SetCombinationLock(CombinationLock.Cast(item));
50 
51  return true;
52  }
53 
54  return false;
55  }
56 
57  override void OnFinishProgressServer(ActionData action_data)
58  {
59  //set dialed number
60  ConstructionActionData constructionActionData = action_data.m_Player.GetConstructionActionData();
61  CombinationLock combination_lock = constructionActionData.GetCombinationLock();
62  combination_lock.DialNextNumber();
63  }
64 }
ItemBase
Definition: inventoryitem.c:730
ActionDialCombinationLockCB
Definition: actiondialcombinationlock.c:1
ConstructionActionData
Definition: constructionactiondata.c:1
CAContinuousRepeat
Definition: cacontinuousrepeat.c:1
CombinationLock
Definition: combinationlock4.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
OnActionInfoUpdate
override void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiondialcombinationlock.c:38
CCTNone
Definition: cctnone.c:1
HasTarget
override bool HasTarget()
Definition: actiondialcombinationlock.c:33
REPEAT_AFTER_SEC
const private float REPEAT_AFTER_SEC
Definition: actiondialcombinationlock.c:2
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actiondialcombinationlock.c:57
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionDialCombinationLock
ActionDialCombinationLockCB ActionContinuousBaseCB ActionDialCombinationLock()
Definition: actiondialcombinationlock.c:13
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
HasProneException
override bool HasProneException()
Definition: actiondialcombinationlock.c:28
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
CreateConditionComponents
override void CreateConditionComponents()
Definition: actiondialcombinationlock.c:22
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiondialcombinationlock.c:44
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68