@@ -40,24 +40,34 @@ export default class Annoucements implements CallbackHook {
40
40
newPhase : PirepState ,
41
41
oldPhase : PirepState ,
42
42
) {
43
- if ( newPhase == PirepState . Pushback ) {
44
- Acars . PlayAudio ( 'pushback.mp3' )
45
- } else if ( newPhase == PirepState . TaxiIn ) {
46
- Acars . PlayAudio ( 'taxi_in.mp3' )
47
- } else if ( newPhase == PirepState . TaxiOut ) {
48
- Acars . PlayAudio ( 'taxi_out.mp3' )
49
- } else if ( newPhase == PirepState . Takeoff ) {
50
- Acars . PlayAudio ( 'takeoff.mp3' )
51
- } else if ( newPhase == PirepState . Enroute ) {
52
- Acars . PlayAudio ( 'enroute.mp3' )
53
- } else if ( newPhase == PirepState . Approach ) {
54
- Acars . PlayAudio ( 'approach.mp3' )
55
- } else if ( newPhase == PirepState . Final ) {
56
- Acars . PlayAudio ( 'landing.mp3' )
57
- } else if ( newPhase == PirepState . Landed ) {
58
- Acars . PlayAudio ( 'landing.mp3' )
59
- } else if ( newPhase == PirepState . Arrived ) {
60
- Acars . PlayAudio ( 'arrived.mp3' )
43
+ switch ( newPhase ) {
44
+ case PirepState . Pushback :
45
+ Acars . PlayAudio ( 'pushback.mp3' )
46
+ break
47
+ case PirepState . TaxiOut :
48
+ Acars . PlayAudio ( 'taxi_out.mp3' )
49
+ break
50
+ case PirepState . Takeoff :
51
+ Acars . PlayAudio ( 'takeoff.mp3' )
52
+ break
53
+ case PirepState . Enroute :
54
+ Acars . PlayAudio ( 'enroute.mp3' )
55
+ break
56
+ case PirepState . Approach :
57
+ Acars . PlayAudio ( 'approach.mp3' )
58
+ break
59
+ case PirepState . Final :
60
+ Acars . PlayAudio ( 'landing.mp3' )
61
+ break
62
+ case PirepState . Landed :
63
+ Acars . PlayAudio ( 'landing.mp3' )
64
+ break
65
+ case PirepState . TaxiIn :
66
+ Acars . PlayAudio ( 'taxi_in.mp3' )
67
+ break
68
+ case PirepState . Arrived :
69
+ Acars . PlayAudio ( 'arrived.mp3' )
70
+ break
61
71
}
62
72
}
63
73
}
0 commit comments