Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
radio.c
Go to the documentation of this file.
1class Radio extends ItemRadio
2{
3 override bool IsTransmitter()
4 {
5 return true;
6 }
7
8 //--- COMMON
9 bool CanOperate()
10 {
11 return GetCompEM().IsSwitchedOn();
12 }
13
14 //--- POWER EVENTS
15 override void OnSwitchOn()
16 {
17 //switch device on
18 SwitchOn ( true );
19 }
20
21 override void OnSwitchOff()
22 {
23 //switch device off
24 SwitchOn ( false );
25 }
26
27 override void OnWorkStop()
28 {
29 //turn off device
30 GetCompEM().SwitchOff();
31 }
32
33 //--- RADIO ACTIONS
34 void TuneNextStation()
35 {
36 //tune next station
37 TuneNext();
38 }
39
40 void TunePreviousStation()
41 {
42 //tune previous station
43 TunePrev();
44 }
45
46 override void SetActions()
47 {
48 super.SetActions();
49
53 }
54}
class ItemBarrel extends InventoryItemSuper TuneNext
proto native void TunePrev()
ActionTuneRadioStationCB ActionContinuousBaseCB ActionTuneRadioStation()
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
void AddAction(typename actionName)
void SetActions()
override void OnWorkStop()