DayZ
1.24
Loading...
Searching...
No Matches
ActionTurnOnTransmitter.c
Go to the documentation of this file.
1
class
ActionTurnOnTransmitterCB
:
ActionSingleUseBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CASingleUseTurnOnPlugged
();
6
}
7
}
8
9
class
ActionTurnOnTransmitter
:
ActionTurnOnWhileInHands
10
{
11
void
ActionTurnOnTransmitter
()
12
{
13
m_CallbackClass =
ActionTurnOnTransmitterCB
;
14
m_CommandUID =
DayZPlayerConstants
.CMD_ACTIONMOD_ITEM_ON;
15
m_CommandUIDProne =
DayZPlayerConstants
.CMD_ACTIONFB_ITEM_ON;
16
m_Text
=
"#turn_on"
;
17
}
18
19
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
20
{
21
if
(
item
.IsTransmitter())
22
return
item
.HasEnergyManager() && !
item
.GetCompEM().IsWorking();
23
24
return
false
;
25
}
26
27
override
void
OnExecuteServer
(
ActionData
action_data
)
28
{
29
action_data
.m_MainItem.GetCompEM().SwitchOn();
30
}
31
}
m_Text
string m_Text
Definition
ActionBase.c:49
ActionTurnOnTransmitter
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
Definition
ActionTurnOnTransmitter.c:11
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionData
Definition
ActionBase.c:21
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
ActionSingleUseBaseCB
Definition
ActionSingleUseBase.c:2
ActionTurnOnTransmitterCB
Definition
ActionTurnOnTransmitter.c:2
ActionTurnOnTransmitterCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionTurnOnTransmitter.c:3
ActionTurnOnWhileInHands
Definition
ActionTurnOnWhileInHands.c:2
ActionTurnOnWhileInHands::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionTurnOnWhileInHands.c:24
ActionTurnOnWhileInHands::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionTurnOnWhileInHands.c:55
CASingleUseTurnOnPlugged
Definition
CASingleUseTurnOnPlugged.c:2
ItemBase
Definition
InventoryItem.c:697
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
SingleUse
ActionTurnOnTransmitter.c
Generated by
1.10.0