DayZ 1.24
Loading...
Searching...
No Matches
ItemTransmitter Class Reference
Collaboration diagram for ItemTransmitter:
[legend]

Protected Member Functions

override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override bool IsTransmitter ()
 
void SetNextFrequency (PlayerBase player=NULL)
 
override void OnSwitchOn ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
void SoundTurnedOnNoiseStart ()
 
void SoundTurnedOnNoiseStop ()
 
override void SetActions ()
 

Protected Attributes

EffectSound m_SoundLoop
 

Private Attributes

string SOUND_RADIO_TURNED_ON = ""
 

Detailed Description

Definition at line 2 of file TransmitterBase.c.

Member Function Documentation

◆ IsTransmitter()

override bool ItemTransmitter::IsTransmitter ( )
inlineprotected

Definition at line 37 of file TransmitterBase.c.

38 {
39 return true;
40 }

◆ OnStoreLoad()

override bool ItemTransmitter::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 18 of file TransmitterBase.c.

19 {
20 if (!super.OnStoreLoad(ctx, version))
21 return false;
22
23 //--- Transmitter data ---
24 //load and set tuned frequency
26 if (!ctx.Read(tuned_frequency_idx))
27 {
28 SetFrequencyByIndex(0); //set default
29 return false;
30 }
31 SetFrequencyByIndex(tuned_frequency_idx);
32 //---
33
34 return true;
35 }

◆ OnStoreSave()

override void ItemTransmitter::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 10 of file TransmitterBase.c.

11 {
12 super.OnStoreSave(ctx);
13
14 //store tuned frequency
15 ctx.Write(GetTunedFrequencyIndex());
16 }

◆ OnSwitchOn()

override void ItemTransmitter::OnSwitchOn ( )
inlineprotected

Definition at line 84 of file TransmitterBase.c.

85 {
86 if (!GetCompEM().CanWork())
87 GetCompEM().SwitchOff();
88 }

◆ OnWorkStart()

override void ItemTransmitter::OnWorkStart ( )
inlineprotected

Definition at line 90 of file TransmitterBase.c.

91 {
92 //turn on broadcasting/receiving
93 EnableBroadcast(true);
94 EnableReceive(true);
95 SwitchOn(true);
96
97 //play sound
99 }
void SoundTurnedOnNoiseStart()

◆ OnWorkStop()

override void ItemTransmitter::OnWorkStop ( )
inlineprotected

Definition at line 101 of file TransmitterBase.c.

102 {
103 //auto switch off (EM)
104 GetCompEM().SwitchOff();
105
106 //turn off broadcasting/receiving
107 EnableBroadcast(false);
108 EnableReceive(false);
109 SwitchOn(false);
110
111 //stop sound
113 }
void SoundTurnedOnNoiseStop()

◆ SetActions()

override void ItemTransmitter::SetActions ( )
inlineprotected

Definition at line 129 of file TransmitterBase.c.

130 {
131 super.SetActions();
132
136 }
ActionTuneFrequencyCB ActionContinuousBaseCB ActionTuneFrequency()
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
void AddAction(typename actionName)

References ActionTuneFrequency(), ActionTurnOffTransmitter(), ActionTurnOnTransmitter(), and AddAction().

◆ SetNextFrequency()

void ItemTransmitter::SetNextFrequency ( PlayerBase player = NULL)
inlineprotected

Definition at line 43 of file TransmitterBase.c.

44 {
45 SetNextChannel();
46
47 /*
48 if ( player )
49 {
50 DisplayRadioInfo( GetTunedFrequency().ToString(), player );
51 }
52 */
53 }

◆ SoundTurnedOnNoiseStart()

void ItemTransmitter::SoundTurnedOnNoiseStart ( )
inlineprotected

Definition at line 119 of file TransmitterBase.c.

120 {
121 PlaySoundSetLoop(m_SoundLoop, SOUND_RADIO_TURNED_ON, 1.0, 1.0);
122 }
string SOUND_RADIO_TURNED_ON
EffectSound m_SoundLoop

◆ SoundTurnedOnNoiseStop()

void ItemTransmitter::SoundTurnedOnNoiseStop ( )
inlineprotected

Definition at line 124 of file TransmitterBase.c.

125 {
126 StopSoundSet(m_SoundLoop);
127 }

Member Data Documentation

◆ m_SoundLoop

EffectSound ItemTransmitter::m_SoundLoop
protected

Definition at line 7 of file TransmitterBase.c.

◆ SOUND_RADIO_TURNED_ON

string ItemTransmitter::SOUND_RADIO_TURNED_ON = ""
private

Definition at line 5 of file TransmitterBase.c.


The documentation for this class was generated from the following file: