DayZ
1.24
Loading...
Searching...
No Matches
ActionTurnOffTransmitterOnGround.c
Go to the documentation of this file.
1
class
ActionTurnOffTransmitterOnGround
:
ActionInteractBase
2
{
3
void
ActionTurnOffTransmitterOnGround
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_OPENDOORFW;
6
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH |
DayZPlayerConstants
.STANCEMASK_ERECT;
7
m_Text
=
"#turn_off"
;
8
}
9
10
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
11
{
12
Object
target_object
=
target
.GetObject();
13
if
(
player
&&
target_object
&&
target_object
.IsStaticTransmitter())
14
{
15
EntityAI
target_entity
=
EntityAI
.Cast(
target_object
);
16
string
selection =
target_object
.GetActionComponentName(
target
.GetComponentIndex());
17
18
if
(
target_entity
.HasEnergyManager() &&
target_entity
.GetCompEM().CanSwitchOff() && selection ==
"power_panel"
)
19
{
20
AdvancedCommunication
transmitter
=
AdvancedCommunication
.Cast(
target_object
);
21
//transmitter.DisplayRadioInfo( "ON", player );
22
23
return
true
;
24
}
25
}
26
27
return
false
;
28
}
29
30
override
void
OnExecuteServer
(
ActionData
action_data
)
31
{
32
AdvancedCommunication
transmitter
=
AdvancedCommunication
.Cast(
action_data
.m_Target.GetObject());
33
transmitter
.TurnOffTransmitter();
34
}
35
}
m_Text
string m_Text
Definition
ActionBase.c:49
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionData
Definition
ActionBase.c:21
ActionInteractBase
Definition
ActionInteractBase.c:50
ActionTurnOffTransmitterOnGround
Definition
ActionTurnOffTransmitterOnGround.c:2
ActionTurnOffTransmitterOnGround::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionTurnOffTransmitterOnGround.c:10
ActionTurnOffTransmitterOnGround::ActionTurnOffTransmitterOnGround
void ActionTurnOffTransmitterOnGround()
Definition
ActionTurnOffTransmitterOnGround.c:3
ActionTurnOffTransmitterOnGround::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionTurnOffTransmitterOnGround.c:30
AdvancedCommunication
Definition
AdvancedCommunication.c:136
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
EntityAI
Definition
Building.c:6
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
ActionTurnOffTransmitterOnGround.c
Generated by
1.10.0