DayZ
1.24
Loading...
Searching...
No Matches
ActionCloseBarrel.c
Go to the documentation of this file.
1
class
ActionCloseBarrel
:
ActionInteractBase
2
{
3
void
ActionCloseBarrel
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_INTERACTONCE;
6
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
7
m_Text
=
"#close"
;
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
30
if
(
ntarget
)
31
ntarget
.DetermineAction(
action_data
.m_Player);
32
}
33
34
override
void
OnEndServer
(
ActionData
action_data
)
35
{
36
Object
target_object
=
action_data
.m_Target.GetObject();
37
Barrel_ColorBase
ntarget
=
Barrel_ColorBase
.Cast(
target_object
);
38
if
(
ntarget
)
39
ntarget
.SoundSynchRemoteReset();
40
}
41
}
m_Text
string m_Text
Definition
ActionBase.c:49
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionCloseBarrel
Definition
ActionCloseBarrel.c:2
ActionCloseBarrel::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionCloseBarrel.c:25
ActionCloseBarrel::ActionCloseBarrel
void ActionCloseBarrel()
Definition
ActionCloseBarrel.c:3
ActionCloseBarrel::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionCloseBarrel.c:10
ActionCloseBarrel::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
ActionCloseBarrel.c:34
ActionData
Definition
ActionBase.c:21
ActionInteractBase
Definition
ActionInteractBase.c:50
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
ActionCloseBarrel.c
Generated by
1.10.0