DayZ 1.24
Loading...
Searching...
No Matches
ActionClose Class Reference
Inheritance diagram for ActionClose:
[legend]
Collaboration diagram for ActionClose:
[legend]

Private Member Functions

void ActionClose ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
 
void SetCloseAnimation (ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionClose.c.

Constructor & Destructor Documentation

◆ ActionClose()

void ActionClose::ActionClose ( )
inlineprivate

Definition at line 3 of file ActionClose.c.

4 {
5 m_Text = "#close";
6 }
string m_Text
Definition ActionBase.c:49

References m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionClose::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 19 of file ActionClose.c.

20 {
21 if (item && item.IsOpen())
22 return true;
23 return false;
24 }

◆ CreateConditionComponents()

override void ActionClose::CreateConditionComponents ( )
inlineprivate

Definition at line 8 of file ActionClose.c.

9 {
12 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool ActionClose::HasTarget ( )
inlineprivate

Definition at line 14 of file ActionClose.c.

15 {
16 return false;
17 }

◆ OnExecuteServer()

override void ActionClose::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 52 of file ActionClose.c.

53 {
54 action_data.m_MainItem.Close();
55 }

◆ SetCloseAnimation()

void ActionClose::SetCloseAnimation ( ItemBase item)
inlineprivate

Definition at line 39 of file ActionClose.c.

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 }
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID.

Referenced by SetupAction().

◆ SetupAction()

override bool ActionClose::SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
inlineprivate

Definition at line 27 of file ActionClose.c.

28 {
29 if (super.SetupAction(player, target, item, action_data, extra_data))
30 {
32
33 return true;
34 }
35
36 return false;
37 }
void SetCloseAnimation(ItemBase item)
Definition ActionClose.c:39

References SetCloseAnimation().


The documentation for this class was generated from the following file: