Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
megaphone.c
Go to the documentation of this file.
1
class
Megaphone
extends
ItemMegaphone
2
{
3
override
bool
IsTransmitter
()
4
{
5
return
true
;
6
}
7
8
//--- POWER EVENTS
9
override
void
OnSwitchOn
()
10
{
11
if
( !GetCompEM().CanWork() )
12
{
13
GetCompEM().SwitchOff();
14
}
15
}
16
17
override
void
OnWorkStart
()
18
{
19
//turn device on
20
SwitchOn (
true
);
// Note: This is not Energy Manager function. This is engine function.
21
}
22
23
override
void
OnWorkStop
()
24
{
25
//auto switch off (EM)
26
GetCompEM().SwitchOff();
27
28
//turn off device
29
SwitchOn (
false
);
// Note: This is not Energy Manager function. This is engine function.
30
}
31
32
//TODO add turn on/off actions
33
//proto native bool CanSpeak();
34
//proto native void SetCanSpeak(bool onOff);
35
36
override
void
SetActions
()
37
{
38
super.SetActions();
39
40
AddAction
(
ActionTurnOnTransmitter
);
41
AddAction
(
ActionTurnOffTransmitter
);
42
AddAction
(
ActionRaiseMegaphone
);
43
}
44
45
}
ActionRaiseMegaphone
ActionRaiseMegaphoneCB ActionContinuousBaseCB ActionRaiseMegaphone()
Definition
actionraisemegaphone.c:13
ActionTurnOffTransmitter
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
Definition
actionturnofftransmitter.c:11
ActionTurnOnTransmitter
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
Definition
actionturnontransmitter.c:11
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
ItemMegaphone
Definition
megaphone.c:2
ItemMegaphone::OnSwitchOn
override void OnSwitchOn()
Definition
megaphone.c:9
ItemMegaphone::OnWorkStop
override void OnWorkStop()
Definition
megaphone.c:23
ItemMegaphone::IsTransmitter
override bool IsTransmitter()
Definition
megaphone.c:3
ItemMegaphone::OnWorkStart
override void OnWorkStart()
Definition
megaphone.c:17
ItemMegaphone::SetActions
override void SetActions()
Definition
megaphone.c:36
Megaphone
@ Megaphone
CCMegaphone.
Definition
constants.c:11
Games
Dayz
scripts
4_world
entities
itembase
megaphone.c
Generated by
1.17.0