Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionopen.c
Go to the documentation of this file.
2 {
3  void ActionOpen()
4  {
5  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENITEM_ONCE;
6  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_OPENITEM_ONCE;
7  //m_Animation = "open";
8  m_Text = "#open";
9  }
10 
11  override void CreateConditionComponents()
12  {
15  }
16 
17  override bool HasTarget()
18  {
19  return false;
20  }
21 
22  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
23  {
24  if ( item && !item.IsOpen() )
25  {
26  return true;
27  }
28  return false;
29  }
30 
31  override bool ActionConditionContinue( ActionData action_data )
32  {
33  return true;
34  }
35 
36  override void OnExecuteClient( ActionData action_data )
37  {
38  ClearInventoryReservationEx(action_data);
39  }
40 
41  override void OnExecuteServer( ActionData action_data )
42  {
43  if( !GetGame().IsMultiplayer() )
44  ClearInventoryReservationEx(action_data);
45 
46  action_data.m_MainItem.Open();
47  }
48 };
ItemBase
Definition: inventoryitem.c:730
GetGame
proto native CGame GetGame()
ActionOpen
Definition: actionopen.c:1
CCTNone
Definition: cctnone.c:1
ClearInventoryReservationEx
void ClearInventoryReservationEx(ActionData action_data)
Definition: actionbase.c:862
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
m_Text
protected string m_Text
Definition: actionbase.c:49
ActionSingleUseBase
Definition: actionsingleusebase.c:41
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56