Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionclosebarrelholes.c
Go to the documentation of this file.
2 {
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  BarrelHoles_ColorBase ntarget = BarrelHoles_ColorBase.Cast( target_object );
16  if( ntarget )
17  {
18  if ( ntarget.IsOpen() )
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 
32  if( ntarget )
33  {
34  ntarget.Close();
35  }
36  }
37 
38  override void OnEndServer( ActionData action_data )
39  {
40  Object target_object = action_data.m_Target.GetObject();
41  BarrelHoles_ColorBase ntarget = BarrelHoles_ColorBase.Cast( target_object );
42  if( ntarget )
43  {
44  ntarget.SoundSynchRemoteReset();
45  }
46  }
47 }
ItemBase
Definition: inventoryitem.c:730
ActionInteractBase
Definition: actioninteractbase.c:54
PlayerBase
Definition: playerbaseclient.c:1
ActionCloseBarrelHoles
Definition: actionclosebarrelholes.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
Object
Definition: objecttyped.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
BarrelHoles_ColorBase
Definition: barrelholes_blue.c:1