Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actiondestroycombinationlock.c
Go to the documentation of this file.
1
class
ActionDestroyCombinationLockCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousRepeat
(6.0);
6
}
7
};
8
10
class
ActionDestroyCombinationLock
:
ActionContinuousBase
11
{
12
static
int
CYCLES
= 5;
13
void
ActionDestroyCombinationLock
()
14
{
15
m_CallbackClass
=
ActionDestroyCombinationLockCB
;
16
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_DISASSEMBLE;
17
m_FullBody
=
true
;
18
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT;
19
m_SpecialtyWeight
= UASoftSkillsWeight.ROUGH_MEDIUM;
20
m_Text
=
"#destroy_combination_lock"
;
21
}
22
23
override
void
CreateConditionComponents
()
24
{
25
m_ConditionTarget
=
new
CCTNonRuined
(
UAMaxDistances
.
DEFAULT
);
26
m_ConditionItem
=
new
CCINonRuined
;
27
}
28
29
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
30
{
31
Object
target_object = target.GetObject();
32
string
selection = target_object.GetActionComponentName( target.GetComponentIndex() );
33
Fence fence = Fence.Cast( target_object );
34
35
if
( fence && fence.IsLocked() && selection ==
"wall_interact"
)
36
{
37
return
true
;
38
}
39
40
return
false
;
41
}
42
43
override
void
OnFinishProgressServer
(
ActionData
action_data )
44
{
45
Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
46
if
( fence )
47
{
48
CombinationLock
combination_lock = fence.GetCombinationLock();
49
if
( combination_lock )
50
{
51
combination_lock.AddHealth(
""
,
""
,-(combination_lock.GetMaxHealth(
""
,
""
)/
CYCLES
));
52
53
if
( combination_lock.IsDamageDestroyed() )
54
{
55
combination_lock.UnlockServer( action_data.m_Player, fence );
56
g_Game
.GetCallQueue(
CALL_CATEGORY_GAMEPLAY
).CallLater( combination_lock.DestroyLock, 200,
false
);
57
}
58
}
59
}
60
61
action_data.m_MainItem.DecreaseHealth(
UADamageApplied
.
SAW_LOCK
,
false
);
62
}
63
64
override
string
GetAdminLogMessage
(
ActionData
action_data)
65
{
66
return
" destroyed combination lock with "
+ action_data.m_MainItem.GetDisplayName();
67
}
68
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::m_FullBody
bool m_FullBody
Definition
actionbase.c:67
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_SpecialtyWeight
float m_SpecialtyWeight
Definition
actionbase.c:83
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionDestroyCombinationLockCB
Definition
actiondestroycombinationlock.c:2
ActionDestroyCombinationLockCB::CreateActionComponent
override void CreateActionComponent()
Definition
actiondestroycombinationlock.c:3
ActionDestroyCombinationLock::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actiondestroycombinationlock.c:43
ActionDestroyCombinationLock::ActionDestroyCombinationLock
void ActionDestroyCombinationLock()
Definition
actiondestroycombinationlock.c:13
ActionDestroyCombinationLock::GetAdminLogMessage
override string GetAdminLogMessage(ActionData action_data)
Definition
actiondestroycombinationlock.c:64
ActionDestroyCombinationLock::CreateConditionComponents
override void CreateConditionComponents()
Definition
actiondestroycombinationlock.c:23
ActionDestroyCombinationLock::CYCLES
static int CYCLES
Definition
actiondestroycombinationlock.c:12
ActionDestroyCombinationLock::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actiondestroycombinationlock.c:29
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CAContinuousRepeat
Definition
cacontinuousrepeat.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTNonRuined
Definition
cctnonruined.c:2
CombinationLock
Definition
combinationlock4.c:2
ItemBase
Definition
inventoryitem.c:742
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
UADamageApplied
Definition
actionconstants.c:147
UADamageApplied::SAW_LOCK
const float SAW_LOCK
Definition
actionconstants.c:152
UAMaxDistances
Definition
actionconstants.c:110
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
actionconstants.c:112
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
CALL_CATEGORY_GAMEPLAY
const int CALL_CATEGORY_GAMEPLAY
Definition
tools.c:10
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actiondestroycombinationlock.c
Generated by
1.17.0