DayZ 1.24
Loading...
Searching...
No Matches
Megaphone.c
Go to the documentation of this file.
2{
3 override bool IsTransmitter()
4 {
5 return true;
6 }
7
8 //--- POWER EVENTS
9 override void OnSwitchOn()
10 {
11 if (!GetCompEM().CanWork())
12 GetCompEM().SwitchOff();
13 }
14
15 override void OnWorkStart()
16 {
17 //turn device on
18 SwitchOn(true); // Note: This is not Energy Manager function. This is engine function.
19 }
20
21 override void OnWorkStop()
22 {
23 //auto switch off (EM)
24 GetCompEM().SwitchOff();
25
26 //turn off device
27 SwitchOn(false); // Note: This is not Energy Manager function. This is engine function.
28 }
29
30 //TODO add turn on/off actions
31 //proto native bool CanSpeak();
32 //proto native void SetCanSpeak(bool onOff);
33
42
43}
ActionRaiseMegaphoneCB ActionContinuousBaseCB ActionRaiseMegaphone()
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
void AddAction(typename actionName)
override void OnWorkStop()
Definition Megaphone.c:21
override void OnSwitchOn()
Definition Megaphone.c:9
override bool IsTransmitter()
Definition Megaphone.c:3
override void OnWorkStart()
Definition Megaphone.c:15
override void SetActions()
Definition Megaphone.c:34
@ Megaphone
CCMegaphone.
Definition constants.c:11