DayZ
1.24
Loading...
Searching...
No Matches
ActionMeasureBattery.c
Go to the documentation of this file.
1
class
ActionMeasureBattery
:
ActionSingleUseBase
2
{
3
4
void
ActionMeasureBattery
()
5
{
6
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_LICKBATTERY;
7
m_CommandUIDProne
=
DayZPlayerConstants
.CMD_ACTIONFB_LICKBATTERY;
8
m_Text
=
"#lick_battery"
;
9
}
10
11
override
void
CreateConditionComponents
()
12
{
13
m_ConditionItem
=
new
CCINonRuined
;
14
m_ConditionTarget
=
new
CCTNone
;
15
}
16
17
override
bool
HasProneException
()
18
{
19
return
true
;
20
}
21
22
override
bool
HasTarget
()
23
{
24
return
false
;
25
}
26
27
override
void
OnExecuteServer
(
ActionData
action_data
)
28
{
29
30
float
energy
= 0;
31
if
(
action_data
.m_MainItem.HasEnergyManager())
32
energy
=
action_data
.m_MainItem.GetCompEM().GetEnergy();
33
action_data
.m_MainItem.TransferModifiers(
action_data
.m_Player);
34
if
(
energy
> 0)
35
InformPlayers
(
action_data
.m_Player,
action_data
.m_Target,
UA_FINISHED
);
36
if
(
energy
== 0)
37
InformPlayers
(
action_data
.m_Player,
action_data
.m_Target,
UA_FAILED
);
38
}
39
};
m_Text
string m_Text
Definition
ActionBase.c:49
InformPlayers
void InformPlayers(PlayerBase player, ActionTarget target, int state)
DEPRECATED delivers message ids to clients based on given context.
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
ActionData
Definition
ActionBase.c:21
ActionMeasureBattery
Definition
ActionMeasureBattery.c:2
ActionMeasureBattery::ActionMeasureBattery
void ActionMeasureBattery()
Definition
ActionMeasureBattery.c:4
ActionMeasureBattery::HasProneException
override bool HasProneException()
Definition
ActionMeasureBattery.c:17
ActionMeasureBattery::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionMeasureBattery.c:27
ActionMeasureBattery::HasTarget
override bool HasTarget()
Definition
ActionMeasureBattery.c:22
ActionMeasureBattery::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionMeasureBattery.c:11
ActionSingleUseBase
Definition
ActionSingleUseBase.c:40
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CommandUIDProne
int m_CommandUIDProne
Definition
AnimatedActionBase.c:123
CCINonRuined
Definition
CCINonRuined.c:2
CCTNone
Definition
CCTNone.c:2
Param3
Definition
EntityAI.c:95
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
UA_FINISHED
const int UA_FINISHED
Definition
constants.c:436
UA_FAILED
const int UA_FAILED
Definition
constants.c:433
scripts
4_World
Classes
UserActionsComponent
Actions
SingleUse
ActionMeasureBattery.c
Generated by
1.10.0