DayZ 1.24
Loading...
Searching...
No Matches
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
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 return true;
26 return false;
27 }
28
30 {
31 return true;
32 }
33
38
40 {
41 if (!GetGame().IsMultiplayer())
43
44 action_data.m_MainItem.Open();
45 }
46};
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
void ClearInventoryReservationEx(ActionData action_data)
Definition ActionBase.c:790
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionOpen.c:22
override void CreateConditionComponents()
Definition ActionOpen.c:11
void ActionOpen()
Definition ActionOpen.c:3
override bool ActionConditionContinue(ActionData action_data)
Definition ActionOpen.c:29
override bool HasTarget()
Definition ActionOpen.c:17
override void OnExecuteClient(ActionData action_data)
Definition ActionOpen.c:34
override void OnExecuteServer(ActionData action_data)
Definition ActionOpen.c:39
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()