Dayz Explorer 1.28.160049
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 {
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
43 }
44
45}
ActionRaiseMegaphoneCB ActionContinuousBaseCB ActionRaiseMegaphone()
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
void AddAction(typename actionName)
void SetActions()
@ Megaphone
CCMegaphone.
Definition constants.c:11
override void OnWorkStop()
override void OnWorkStart()