DayZ
1.24
Loading...
Searching...
No Matches
ActionOpenBarrel.c
Go to the documentation of this file.
1
class
ActionOpenBarrel
:
ActionInteractBase
2
{
3
void
ActionOpenBarrel
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_INTERACTONCE;
6
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
7
m_Text
=
"#open"
;
8
}
9
10
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
11
{
12
Object
target_object
=
target
.GetObject();
13
if
(
target_object
.IsItemBase())
14
{
15
Barrel_ColorBase
ntarget
=
Barrel_ColorBase
.Cast(
target_object
);
16
if
(
ntarget
)
17
{
18
if
(!
ntarget
.IsLocked() && !
ntarget
.IsOpen())
19
return
true
;
20
}
21
}
22
return
false
;
23
}
24
25
override
void
OnExecuteServer
(
ActionData
action_data
)
26
{
27
Object
target_object
=
action_data
.m_Target.GetObject();
28
Barrel_ColorBase
ntarget
=
Barrel_ColorBase
.Cast(
target_object
);
29
if
(
ntarget
)
30
ntarget
.Open();
31
}
32
33
override
void
OnEndServer
(
ActionData
action_data
)
34
{
35
Object
target_object
=
action_data
.m_Target.GetObject();
36
Barrel_ColorBase
ntarget
=
Barrel_ColorBase
.Cast(
target_object
);
37
if
(
ntarget
)
38
ntarget
.SoundSynchRemoteReset();
39
}
40
}
m_Text
string m_Text
Definition
ActionBase.c:49
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionData
Definition
ActionBase.c:21
ActionInteractBase
Definition
ActionInteractBase.c:50
ActionOpenBarrel
Definition
ActionOpenBarrel.c:2
ActionOpenBarrel::ActionOpenBarrel
void ActionOpenBarrel()
Definition
ActionOpenBarrel.c:3
ActionOpenBarrel::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
ActionOpenBarrel.c:33
ActionOpenBarrel::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionOpenBarrel.c:10
ActionOpenBarrel::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionOpenBarrel.c:25
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
Barrel_ColorBase
Definition
Barrel_ColorBase.c:2
ItemBase
Definition
InventoryItem.c:697
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
scripts
4_World
Classes
UserActionsComponent
Actions
Interact
ActionOpenBarrel.c
Generated by
1.10.0