DayZ 1.24
Loading...
Searching...
No Matches
ActionNextCombinationLockDialOnTarget.c
Go to the documentation of this file.
2{
4 {
5 m_Text = "#next_combination_lock_dial";
6 }
7
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
37 {
38 super.Start(action_data);
39
40 //set next dial
41 ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
44 combination_lock.SetNextDial();
45 }
46}
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT