Skip to content

Commit

Permalink
Fixed pre-build file overwrite
Browse files Browse the repository at this point in the history
Removed testing workaround for missing 0 in female sound pack
Added flight number announcement
  • Loading branch information
markus-korbel committed Dec 25, 2021
1 parent 73fa675 commit 926ff90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OpenSky.AgentMSFS/SpeechSoundPacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private SpeechSoundPacks()
if (packDictionary.ContainsKey(SpeechEvent.ReadyForBoardingBeginning) && packDictionary.ContainsKey(SpeechEvent.ReadyForBoardingEnd) && packDictionary.ContainsKey(SpeechEvent.Number1) &&
packDictionary.ContainsKey(SpeechEvent.Number2) && packDictionary.ContainsKey(SpeechEvent.Number3) && packDictionary.ContainsKey(SpeechEvent.Number4) && packDictionary.ContainsKey(SpeechEvent.Number5) &&
packDictionary.ContainsKey(SpeechEvent.Number6) && packDictionary.ContainsKey(SpeechEvent.Number7) && packDictionary.ContainsKey(SpeechEvent.Number8) && packDictionary.ContainsKey(SpeechEvent.Number9) &&
packDictionary.ContainsKey(SpeechEvent.Number9)) // todo change last check back to 0!
packDictionary.ContainsKey(SpeechEvent.Number0))
{
packDictionary.Add(SpeechEvent.ReadyForBoarding, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public NewFlightNotificationViewModel()
var player = new SoundPlayer(assembly.GetManifestResourceStream("OpenSky.AgentMSFS.Resources.OSannouncement.wav"));
player.Play();

new Thread(
() =>
{
Thread.Sleep(2000);
SpeechSoundPacks.Instance.PlaySpeechEvent(SpeechEvent.ReadyForBoarding, true, SimConnect.SimConnect.Instance.Flight?.FlightNumber.ToString());
})
{ Name = "OpenSky.NewFlightNotificationViewModel.SpeechFlightNumber" }.Start();

this.StartTrackingCommand = new Command(this.StartTracking);
new Thread(this.NotificationTimeout) { Name = "OpenSky.NewFlightNotificationTimeout" }.Start();
}
Expand Down
4 changes: 2 additions & 2 deletions OpenSky.AgentMSFS/pre-build.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
copy /Y "%1\app.config.%2" "%1\app.config"
xcopy "%1\..\SoundPacks\FemaleUS" "%1\bin\%2\SoundPacks\FemaleUS" /E /I
xcopy "%1\..\SoundPacks\MaleUK" "%1\bin\%2\SoundPacks\MaleUK" /E /I
xcopy "%1\..\SoundPacks\FemaleUS" "%1\bin\%2\SoundPacks\FemaleUS" /E /I /Y
xcopy "%1\..\SoundPacks\MaleUK" "%1\bin\%2\SoundPacks\MaleUK" /E /I /Y

0 comments on commit 926ff90

Please sign in to comment.