Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionopenbarrelholes.c
Go to the documentation of this file.
1
class
ActionOpenBarrelHoles
:
ActionInteractBase
2
{
3
void
ActionOpenBarrelHoles
()
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
BarrelHoles_ColorBase
ntarget =
BarrelHoles_ColorBase
.Cast( target_object );
16
if
( ntarget )
17
{
18
if
( !ntarget.IsOpen() && !ntarget.DirectCookingSlotsInUse() )
19
{
20
return
true
;
21
}
22
}
23
}
24
return
false
;
25
}
26
27
override
void
OnExecuteServer
(
ActionData
action_data )
28
{
29
Object
target_object = action_data.m_Target.GetObject();
30
BarrelHoles_ColorBase
ntarget =
BarrelHoles_ColorBase
.Cast( target_object );
31
if
( ntarget )
32
{
33
ntarget.Open();
34
if
(ntarget.GetBarrelOpenSoundset() !=
string
.Empty)
35
ntarget.StartItemSoundServer(SoundConstants.ITEM_BARREL_OPEN);
36
}
37
}
38
}
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionInteractBase::ActionInteractBase
void ActionInteractBase()
Definition
actioninteractbase.c:43
ActionOpenBarrelHoles::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
actionopenbarrelholes.c:27
ActionOpenBarrelHoles::ActionOpenBarrelHoles
void ActionOpenBarrelHoles()
Definition
actionopenbarrelholes.c:3
ActionOpenBarrelHoles::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionopenbarrelholes.c:10
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
BarrelHoles_ColorBase
Definition
barrelholes_blue.c:2
ItemBase
Definition
inventoryitem.c:742
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
interact
actionopenbarrelholes.c
Generated by
1.17.0