Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionzoomout.c
Go to the documentation of this file.
1
class
ActionZoomOut
:
ActionSingleUseBase
2
{
3
void
ActionZoomOut
()
4
{
5
m_Text
=
"#zoom_out"
;
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
ItemOptics
optic;
22
if
(
Class
.
CastTo
(optic, item) && optic.
IsInOptics
() )
23
{
24
return
true
;
25
}
26
return
false
;
27
}
28
29
override
void
OnEndServer
(
ActionData
action_data )
30
{
31
super.OnEndServer(action_data);
32
33
ItemOptics
optic;
34
if
(
Class
.
CastTo
(optic, action_data.m_MainItem) )
35
{
36
optic.
ExitOptics
();
37
}
38
}
39
};
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
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
ActionZoomOut::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
actionzoomout.c:29
ActionZoomOut::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionzoomout.c:8
ActionZoomOut::ActionZoomOut
void ActionZoomOut()
Definition
actionzoomout.c:3
ActionZoomOut::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionzoomout.c:19
ActionZoomOut::HasTarget
override bool HasTarget()
Definition
actionzoomout.c:14
CCINonRuined
Definition
ccinonruined.c:2
CCTNone
Definition
cctnone.c:2
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
ItemBase
Definition
inventoryitem.c:742
ItemOptics
Definition
itemoptics.c:2
ItemOptics::IsInOptics
proto native bool IsInOptics()
is weapon in optics mode or not
ItemOptics::ExitOptics
proto native bool ExitOptics()
switches out of optics mode (if possible)
PlayerBase
Definition
playerbaseclient.c:2
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionzoomout.c
Generated by
1.17.0