Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionzoomin.c
Go to the documentation of this file.
1
class
ActionZoomIn
:
ActionSingleUseBase
2
{
3
void
ActionZoomIn
()
4
{
5
m_Text
=
"#zoom_in"
;
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.
EnterOptics
();
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
ActionZoomIn::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
actionzoomin.c:29
ActionZoomIn::ActionZoomIn
void ActionZoomIn()
Definition
actionzoomin.c:3
ActionZoomIn::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionzoomin.c:8
ActionZoomIn::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionzoomin.c:19
ActionZoomIn::HasTarget
override bool HasTarget()
Definition
actionzoomin.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::EnterOptics
proto native bool EnterOptics()
switches to optics mode if possible
ItemOptics::IsInOptics
proto native bool IsInOptics()
is weapon in optics mode or not
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
actionzoomin.c
Generated by
1.17.0