DayZ
1.24
Loading...
Searching...
No Matches
Land_Radio_PanelPAS.c
Go to the documentation of this file.
1
class
Land_Radio_PanelPAS
extends
PASBroadcaster
2
{
3
//Sounds
4
const
string
SOUND_PAS_TURN_ON =
"pastransmitter_turnon_SoundSet"
;
5
const
string
SOUND_PAS_TURN_OFF =
"pastransmitter_turnoff_SoundSet"
;
6
const
string
SOUND_PAS_TURNED_ON =
"pastransmitter_staticnoise_SoundSet"
;
7
8
protected
EffectSound
m_Sound
;
9
protected
EffectSound
m_SoundLoop
;
10
11
//--- BASE
12
override
bool
IsStaticTransmitter
()
13
{
14
return
true
;
15
}
16
17
override
bool
DisableVicinityIcon
()
18
{
19
return
true
;
20
}
21
22
//--- POWER EVENTS
23
override
void
OnSwitchOn
()
24
{
25
super
.OnSwitchOn();
26
27
if
(!GetCompEM().CanWork())
28
GetCompEM().SwitchOff();
29
30
//sound
31
SoundTurnOn();
32
}
33
34
override
void
OnSwitchOff
()
35
{
36
super
.OnSwitchOff();
37
38
//sound
39
SoundTurnOff();
40
}
41
42
override
void
OnWorkStart
()
43
{
44
super
.OnWorkStart();
45
46
//turn off device
47
SwitchOn(
true
);
// start send/receive voice
48
49
//sound
50
SoundTurnedOnNoiseStart();
51
}
52
53
override
void
OnWorkStop
()
54
{
55
super
.OnWorkStop();
56
57
//turn off device
58
SwitchOn(
false
);
// stop send/receive voice
59
60
//sound
61
SoundTurnedOnNoiseStop();
62
}
63
64
//================================================================
65
// SOUNDS
66
//================================================================
67
//Static noise when the radio is turned on
68
protected
void
SoundTurnedOnNoiseStart
()
69
{
70
PlaySoundSetLoop(m_SoundLoop, SOUND_PAS_TURNED_ON, 1.0, 1.0);
71
}
72
73
protected
void
SoundTurnedOnNoiseStop
()
74
{
75
StopSoundSet(m_SoundLoop);
76
}
77
78
protected
void
SoundTurnOn
()
79
{
80
PlaySoundSet(
m_Sound
, SOUND_PAS_TURN_ON, 0, 0);
81
}
82
83
protected
void
SoundTurnOff
()
84
{
85
PlaySoundSet(
m_Sound
, SOUND_PAS_TURN_OFF, 0, 0);
86
}
87
}
m_Sound
EffectSound m_Sound
Definition
HungerSoundHandler.c:18
EffectSound
Wrapper class for managing sound through SEffectManager.
Definition
EffectSound.c:5
PASBroadcaster
Definition
Land_Radio_PanelPAS.c:2
PASBroadcaster::SoundTurnedOnNoiseStop
void SoundTurnedOnNoiseStop()
Definition
Land_Radio_PanelPAS.c:73
PASBroadcaster::OnWorkStart
override void OnWorkStart()
Definition
Land_Radio_PanelPAS.c:42
PASBroadcaster::DisableVicinityIcon
override bool DisableVicinityIcon()
Definition
Land_Radio_PanelPAS.c:17
PASBroadcaster::SoundTurnOn
void SoundTurnOn()
Definition
Land_Radio_PanelPAS.c:78
PASBroadcaster::SoundTurnedOnNoiseStart
void SoundTurnedOnNoiseStart()
Definition
Land_Radio_PanelPAS.c:68
PASBroadcaster::m_Sound
EffectSound m_Sound
Definition
Land_Radio_PanelPAS.c:8
PASBroadcaster::m_SoundLoop
EffectSound m_SoundLoop
Definition
Land_Radio_PanelPAS.c:9
PASBroadcaster::IsStaticTransmitter
override bool IsStaticTransmitter()
Definition
Land_Radio_PanelPAS.c:12
PASBroadcaster::OnSwitchOn
override void OnSwitchOn()
Definition
Land_Radio_PanelPAS.c:23
PASBroadcaster::OnWorkStop
override void OnWorkStop()
Definition
Land_Radio_PanelPAS.c:53
PASBroadcaster::SoundTurnOff
void SoundTurnOff()
Definition
Land_Radio_PanelPAS.c:83
PASBroadcaster::OnSwitchOff
override void OnSwitchOff()
Definition
Land_Radio_PanelPAS.c:34
Param3
Definition
EntityAI.c:95
scripts
4_World
Entities
AdvancedCommunication
Land_Radio_PanelPAS.c
Generated by
1.10.0