DayZ 1.24
Loading...
Searching...
No Matches
ActionClose.c
Go to the documentation of this file.
2{
4 {
5 m_Text = "#close";
6 }
7
13
14 override bool HasTarget()
15 {
16 return false;
17 }
18
19 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
20 {
21 if (item && item.IsOpen())
22 return true;
23 return false;
24 }
25
26 //setup
28 {
29 if (super.SetupAction(player, target, item, action_data, extra_data))
30 {
32
33 return true;
34 }
35
36 return false;
37 }
38
40 {
41 switch (item.Type())
42 {
43 case Compass:
44 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_CLOSEITEM_ONCE;
45 break;
46 case TelescopicBaton:
47 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
48 break;
49 }
50 }
51
53 {
54 action_data.m_MainItem.Close();
55 }
56};
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
void SetCloseAnimation(ItemBase item)
Definition ActionClose.c:39
override bool HasTarget()
Definition ActionClose.c:14
override bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Definition ActionClose.c:27
override void OnExecuteServer(ActionData action_data)
Definition ActionClose.c:52
override void CreateConditionComponents()
Definition ActionClose.c:8
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionClose.c:19
void ActionClose()
Definition ActionClose.c:3
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597