DayZ 1.24
Loading...
Searching...
No Matches
ActionDialCombinationLock.c File Reference

Go to the source code of this file.

Classes

class  ActionDialCombinationLockCB
 

Functions

ActionDialCombinationLockCB ActionContinuousBaseCB ActionDialCombinationLock ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool HasProneException ()
 
override bool HasTarget ()
 
override void OnActionInfoUpdate (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Variables

const float REPEAT_AFTER_SEC = 0.5
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 44 of file ActionDialCombinationLock.c.

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 }

◆ ActionDialCombinationLock()

ActionDialCombinationLockCB ActionContinuousBaseCB ActionDialCombinationLock ( )

Definition at line 1 of file ActionDialCombinationLock.c.

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 }
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and SetActions().

◆ CreateActionComponent()

override void ActionDialCombinationLock::CreateActionComponent ( )
private

Definition at line 16 of file ActionDialCombinationLock.c.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 22 of file ActionDialCombinationLock.c.

23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasProneException()

override bool HasProneException ( )

Definition at line 28 of file ActionDialCombinationLock.c.

29 {
30 return true;
31 }

◆ HasTarget()

override bool HasTarget ( )

Definition at line 33 of file ActionDialCombinationLock.c.

34 {
35 return false;
36 }

◆ OnActionInfoUpdate()

override void OnActionInfoUpdate ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 38 of file ActionDialCombinationLock.c.

39 {
40 ConstructionActionData constructionActionData = player.GetConstructionActionData();
41 m_Text = "#dial_combination_lock " + constructionActionData.GetDialNumberText();
42 }

References m_Text.

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 57 of file ActionDialCombinationLock.c.

58 {
59 //set dialed number
60 ConstructionActionData constructionActionData = action_data.m_Player.GetConstructionActionData();
62 combination_lock.DialNextNumber();
63 }

Variable Documentation

◆ REPEAT_AFTER_SEC

const float REPEAT_AFTER_SEC = 0.5
private

Definition at line 14 of file ActionDialCombinationLock.c.