DayZ 1.24
Loading...
Searching...
No Matches
ActionDialCombinationLock.c
Go to the documentation of this file.
2{
3 private const float REPEAT_AFTER_SEC = 0.5;
4
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
23 {
26 }
27
28 override bool HasProneException()
29 {
30 return true;
31 }
32
33 override bool HasTarget()
34 {
35 return false;
36 }
37
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
58 {
59 //set dialed number
60 ConstructionActionData constructionActionData = action_data.m_Player.GetConstructionActionData();
62 combination_lock.DialNextNumber();
63 }
64}
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
bool HasTarget()
Definition ActionBase.c:210
void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:909
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
ActionDialCombinationLockCB ActionContinuousBaseCB ActionDialCombinationLock()
ActionData m_ActionData
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool HasProneException()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597