DayZ
1.24
Toggle main menu visibility
Main Page
Topics
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Modules
Loading...
Searching...
No Matches
ActionTurnOnPowerGenerator.c
Go to the documentation of this file.
1
class
ActionTurnOnPowerGenerator
:
ActionInteractBase
2
{
3
void
ActionTurnOnPowerGenerator
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_INTERACTONCE;
6
m_Text
=
"#switch_on"
;
7
}
3
void
ActionTurnOnPowerGenerator
() {
…
}
8
9
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
10
{
11
PowerGeneratorBase
pg
= PowerGeneratorBase.Cast(
target
.GetObject());
12
13
if
(
pg
)
14
{
15
if
(
pg
.HasEnergyManager() &&
pg
.GetCompEM().CanSwitchOn() &&
pg
.HasSparkplug() &&
pg
.GetCompEM().CanWork())
16
return
true
;
17
}
18
19
return
false
;
20
}
9
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
) {
…
}
21
22
override
void
OnExecuteServer
(
ActionData
action_data
)
23
{
24
Object
targetObject
=
action_data
.m_Target.GetObject();
25
if
(
targetObject
)
26
{
27
ItemBase
target_IB
=
ItemBase
.Cast(
targetObject
);
28
target_IB
.GetCompEM().SwitchOn();
29
target_IB
.GetCompEM().InteractBranch(
target_IB
);
30
}
31
}
22
override
void
OnExecuteServer
(
ActionData
action_data
) {
…
}
32
};
1
class
ActionTurnOnPowerGenerator
:
ActionInteractBase
{
…
};
m_Text
string m_Text
Definition
ActionBase.c:49
ActionData
Definition
ActionBase.c:21
ActionInteractBase
Definition
ActionInteractBase.c:50
ActionTurnOnPowerGenerator
Definition
ActionTurnOnPowerGenerator.c:2
ActionTurnOnPowerGenerator::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionTurnOnPowerGenerator.c:9
ActionTurnOnPowerGenerator::ActionTurnOnPowerGenerator
void ActionTurnOnPowerGenerator()
Definition
ActionTurnOnPowerGenerator.c:3
ActionTurnOnPowerGenerator::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionTurnOnPowerGenerator.c:22
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
ItemBase
Definition
InventoryItem.c:697
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
scripts
4_World
Classes
UserActionsComponent
Actions
Interact
ActionTurnOnPowerGenerator.c
Generated by
1.10.0