DayZ 1.24
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
35 {
36 //tune next station
37 TuneNext();
38 }
39
41 {
42 //tune previous station
43 TunePrev();
44 }
45
54}
class ItemBarrel extends InventoryItemSuper TuneNext
proto native void TunePrev()
ActionTuneRadioStationCB ActionContinuousBaseCB ActionTuneRadioStation()
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
void AddAction(typename actionName)
override void OnSwitchOff()
Definition Radio.c:21
void TunePreviousStation()
Definition Radio.c:40
override void OnWorkStop()
Definition Radio.c:27
void TuneNextStation()
Definition Radio.c:34
override void SetActions()
Definition Radio.c:46
bool CanOperate()
Definition Radio.c:9
override void OnSwitchOn()
Definition Radio.c:15
override bool IsTransmitter()
Definition Radio.c:3