Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionclose.c
Go to the documentation of this file.
1
class
ActionClose
:
ActionSingleUseBase
2
{
3
void
ActionClose
()
4
{
5
m_Text
=
"#close"
;
6
}
7
8
override
void
CreateConditionComponents
()
9
{
10
m_ConditionItem
=
new
CCINonRuined
;
11
m_ConditionTarget
=
new
CCTNone
;
12
}
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
{
23
return
true
;
24
}
25
return
false
;
26
}
27
28
//setup
29
override
bool
SetupAction
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item, out
ActionData
action_data,
Param
extra_data = NULL )
30
{
31
if
( super.SetupAction( player, target, item, action_data, extra_data ) )
32
{
33
SetCloseAnimation
( item );
34
35
return
true
;
36
}
37
38
return
false
;
39
}
40
41
void
SetCloseAnimation
(
ItemBase
item )
42
{
43
switch
( item.Type() )
44
{
45
case
Compass
:
46
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_CLOSEITEM_ONCE;
47
break
;
48
case
TelescopicBaton
:
49
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_PICKUP_HANDS;
50
break
;
51
}
52
}
53
54
override
void
OnExecuteServer
(
ActionData
action_data )
55
{
56
action_data.m_MainItem.Close();
57
}
58
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionClose::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
actionclose.c:54
ActionClose::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionclose.c:8
ActionClose::SetCloseAnimation
void SetCloseAnimation(ItemBase item)
Definition
actionclose.c:41
ActionClose::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionclose.c:19
ActionClose::HasTarget
override bool HasTarget()
Definition
actionclose.c:14
ActionClose::SetupAction
override bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Definition
actionclose.c:29
ActionClose::ActionClose
void ActionClose()
Definition
actionclose.c:3
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
CCINonRuined
Definition
ccinonruined.c:2
CCTNone
Definition
cctnone.c:2
Compass
Definition
compass.c:2
ItemBase
Definition
inventoryitem.c:742
Param
Base Param Class with no parameters.
Definition
param.c:12
PlayerBase
Definition
playerbaseclient.c:2
TelescopicBaton
Definition
telescopicbaton.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionclose.c
Generated by
1.17.0