Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionraisemegaphone.c
Go to the documentation of this file.
1
class
ActionRaiseMegaphoneCB
:
ActionContinuousBaseCB
2
{
3
private
const
float
REPEAT_AFTER_SEC
= -1.0;
4
5
override
void
CreateActionComponent
()
6
{
7
m_ActionData
.m_ActionComponent =
new
CAContinuousTime
( -1 );
8
}
9
}
10
11
class
ActionRaiseMegaphone
:
ActionContinuousBase
12
{
13
void
ActionRaiseMegaphone
()
14
{
15
m_CallbackClass =
ActionRaiseMegaphoneCB
;
16
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_RAISEITEM;
17
m_CommandUIDProne
=
DayZPlayerConstants
.CMD_ACTIONFB_RAISEITEM;
18
m_Text =
"#raise_megaphone"
;
19
}
20
21
override
void
CreateConditionComponents
()
22
{
23
m_ConditionTarget =
new
CCTNone
;
24
m_ConditionItem =
new
CCINonRuined
;
25
}
26
27
override
bool
HasProneException
()
28
{
29
return
true
;
30
}
31
32
override
bool
HasProgress
()
33
{
34
return
false
;
35
}
36
37
override
bool
HasTarget
()
38
{
39
return
false
;
40
}
41
42
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
43
{
44
if
( item.IsTransmitter() )
45
{
46
ItemMegaphone
megaphone =
ItemMegaphone
.Cast( item );
47
48
if
( megaphone && megaphone.GetCompEM().IsWorking() )
49
{
50
return
true
;
51
}
52
}
53
54
return
false
;
55
}
56
57
override
void
OnStartServer
(
ActionData
action_data )
58
{
59
super.OnStartServer(action_data);
60
61
ItemMegaphone
megaphone =
ItemMegaphone
.Cast( action_data.m_MainItem );
62
megaphone.SetCanSpeak(
true
);
63
}
64
65
override
void
OnEndServer
(
ActionData
action_data )
66
{
67
super.OnEndServer(action_data);
68
69
ItemMegaphone
megaphone =
ItemMegaphone
.Cast( action_data.m_MainItem );
70
megaphone.SetCanSpeak(
false
);
71
}
72
73
override
void
OnStartClient
(
ActionData
action_data )
74
{
75
ItemMegaphone
megaphone =
ItemMegaphone
.Cast( action_data.m_MainItem );
76
megaphone.SetCanSpeak(
true
);
77
}
78
79
override
void
OnEndClient
(
ActionData
action_data )
80
{
81
ItemMegaphone
megaphone =
ItemMegaphone
.Cast( action_data.m_MainItem );
82
megaphone.SetCanSpeak(
false
);
83
}
84
85
}
m_CommandUIDProne
int m_CommandUIDProne
Definition
actionbase.c:32
m_CommandUID
int m_CommandUID
Definition
actionbase.c:31
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionRaiseMegaphone
ActionRaiseMegaphoneCB ActionContinuousBaseCB ActionRaiseMegaphone()
Definition
actionraisemegaphone.c:13
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::CreateConditionComponents
void CreateConditionComponents()
Definition
actionbase.c:236
ActionBase::HasTarget
bool HasTarget()
Action is performed on target, not with item itself, when set to true.
Definition
actionbase.c:250
ActionBase::OnStartClient
void OnStartClient(ActionData action_data)
Definition
actionbase.c:1277
ActionBase::HasProgress
bool HasProgress()
For UI: hiding of progress bar.
Definition
actionbase.c:256
ActionBase::OnEndClient
void OnEndClient(ActionData action_data)
Definition
actionbase.c:1290
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase
Definition
actioncontinuousbase.c:121
ActionRaiseMegaphoneCB
Definition
actionraisemegaphone.c:2
ActionRaiseMegaphoneCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionraisemegaphone.c:5
ActionRaiseMegaphoneCB::REPEAT_AFTER_SEC
const float REPEAT_AFTER_SEC
Definition
actionraisemegaphone.c:3
AnimatedActionBase::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
animatedactionbase.c:497
AnimatedActionBase::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
animatedactionbase.c:240
AnimatedActionBase::HasProneException
override bool HasProneException()
Definition
animatedactionbase.c:318
AnimatedActionBase::OnStartServer
override void OnStartServer(ActionData action_data)
Definition
animatedactionbase.c:489
CAContinuousTime
Definition
cacontinuoustime.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTNone
Definition
cctnone.c:2
ItemBase
Definition
inventoryitem.c:742
ItemMegaphone
Definition
megaphone.c:2
PlayerBase
Definition
playerbaseclient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actionraisemegaphone.c
Generated by
1.17.0