BattleIntro CustomBattleMusic fix
This commit is contained in:
parent
1c2b3a94fb
commit
9b8022897c
|
@ -523,15 +523,14 @@ Public Class MusicManager
|
||||||
If _songs.ContainsKey(key) = True Then
|
If _songs.ContainsKey(key) = True Then
|
||||||
Return _songs(key)
|
Return _songs(key)
|
||||||
Else
|
Else
|
||||||
If System.IO.File.Exists(gamemodeSongFilePath & ".ogg") = True Or System.IO.File.Exists(defaultSongFilePath & ".ogg") = True Or System.IO.File.Exists(contentSongFilePath & ".ogg") = True Then
|
If System.IO.File.Exists(contentSongFilePath & ".ogg") = True OrElse System.IO.File.Exists(gamemodeSongFilePath & ".ogg") = True Or System.IO.File.Exists(defaultSongFilePath & ".ogg") = True Then
|
||||||
audiotype = ".ogg"
|
audiotype = ".ogg"
|
||||||
ElseIf System.IO.File.Exists(gamemodeSongFilePath & ".mp3") = True Or System.IO.File.Exists(defaultSongFilePath & ".mp3") = True Or System.IO.File.Exists(contentSongFilePath & ".mp3") = True Then
|
ElseIf System.IO.File.Exists(contentSongFilePath & ".mp3") = True OrElse System.IO.File.Exists(gamemodeSongFilePath & ".mp3") = True Or System.IO.File.Exists(defaultSongFilePath & ".mp3") = True Then
|
||||||
audiotype = ".mp3"
|
audiotype = ".mp3"
|
||||||
ElseIf System.IO.File.Exists(gamemodeSongFilePath & ".wma") = True Or System.IO.File.Exists(defaultSongFilePath & ".wma") = True Or System.IO.File.Exists(contentSongFilePath & ".wma") = True Then
|
ElseIf System.IO.File.Exists(contentSongFilePath & ".wma") = True OrElse System.IO.File.Exists(gamemodeSongFilePath & ".wma") = True Or System.IO.File.Exists(defaultSongFilePath & ".wma") = True Then
|
||||||
audiotype = ".wma"
|
audiotype = ".wma"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If File.Exists(contentSongFilePath & audiotype) Then
|
If File.Exists(contentSongFilePath & audiotype) Then
|
||||||
If AddSong(key, False) = True Then
|
If AddSong(key, False) = True Then
|
||||||
Return _songs(key)
|
Return _songs(key)
|
||||||
|
|
|
@ -23,17 +23,19 @@
|
||||||
|
|
||||||
Public Sub New(ByVal OldScreen As Screen, ByVal NewScreen As Screen, ByVal IntroType As Integer)
|
Public Sub New(ByVal OldScreen As Screen, ByVal NewScreen As Screen, ByVal IntroType As Integer)
|
||||||
Dim musicLoop As String = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_intro"
|
Dim musicLoop As String = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_intro"
|
||||||
|
If Not BattleSystem.BattleScreen.CustomBattleMusic = "" OrElse MusicManager.SongExists(BattleSystem.BattleScreen.CustomBattleMusic) = True Then
|
||||||
If BattleSystem.BattleScreen.RoamingBattle = True Then
|
musicLoop = BattleSystem.BattleScreen.CustomBattleMusic & "_intro"
|
||||||
If BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop <> "" Then
|
Else
|
||||||
musicLoop = BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop & "_intro"
|
If BattleSystem.BattleScreen.RoamingBattle = True Then
|
||||||
|
If BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop <> "" Then
|
||||||
|
musicLoop = BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop & "_intro"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MusicManager.SongExists(musicLoop) = False Then
|
If MusicManager.SongExists(musicLoop) = False Then
|
||||||
musicLoop = "johto_wild_intro"
|
musicLoop = "johto_wild_intro"
|
||||||
End If
|
End If
|
||||||
musicLoop = musicLoop
|
|
||||||
|
|
||||||
Me.Constructor(OldScreen, NewScreen, Nothing, musicLoop, IntroType)
|
Me.Constructor(OldScreen, NewScreen, Nothing, musicLoop, IntroType)
|
||||||
End Sub
|
End Sub
|
||||||
|
@ -51,9 +53,6 @@
|
||||||
MusicLoop = "johto_wild_intro"
|
MusicLoop = "johto_wild_intro"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
MusicLoop = MusicLoop
|
|
||||||
Else
|
|
||||||
MusicLoop = MusicLoop
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Me.Constructor(OldScreen, NewScreen, Nothing, MusicLoop, IntroType)
|
Me.Constructor(OldScreen, NewScreen, Nothing, MusicLoop, IntroType)
|
||||||
|
@ -506,19 +505,19 @@
|
||||||
Player.Temp.BeforeBattleFacing = Screen.Camera.GetPlayerFacingDirection()
|
Player.Temp.BeforeBattleFacing = Screen.Camera.GetPlayerFacingDirection()
|
||||||
Dim b As BattleSystem.BattleScreen = CType(Me.NewScreen, BattleSystem.BattleScreen)
|
Dim b As BattleSystem.BattleScreen = CType(Me.NewScreen, BattleSystem.BattleScreen)
|
||||||
|
|
||||||
If b.IsPVPBattle = True Then
|
If BattleSystem.BattleScreen.CustomBattleMusic = "" OrElse MusicManager.SongExists(BattleSystem.BattleScreen.CustomBattleMusic) = False Then
|
||||||
MusicManager.Play(MusicLoop, False, 0.0F, False, "pvp")
|
If b.IsPVPBattle = True Then
|
||||||
Else
|
MusicManager.Play(MusicLoop, False, 0.0F, False, "pvp")
|
||||||
If b.IsTrainerBattle = True Then
|
|
||||||
MusicManager.Play(MusicLoop, False, 0.0F, False, Trainer.GetBattleMusicName())
|
|
||||||
ElseIf Screen.Level.IsSafariZone = True Or Screen.Level.IsBugCatchingContest = True Then
|
|
||||||
If MusicManager.SongExists(Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
|
|
||||||
MusicManager.Play(MusicLoop, False, 0.0F, False, Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild")
|
|
||||||
Else
|
|
||||||
MusicManager.Play(MusicLoop, False, 0.0F, False, "johto_wild")
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
If BattleSystem.BattleScreen.CustomBattleMusic = "" OrElse MusicManager.SongExists(BattleSystem.BattleScreen.CustomBattleMusic) = False Then
|
If b.IsTrainerBattle = True Then
|
||||||
|
MusicManager.Play(MusicLoop, False, 0.0F, False, Trainer.GetBattleMusicName())
|
||||||
|
ElseIf Screen.Level.IsSafariZone = True Or Screen.Level.IsBugCatchingContest = True Then
|
||||||
|
If MusicManager.SongExists(Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
|
||||||
|
MusicManager.Play(MusicLoop, False, 0.0F, False, Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild")
|
||||||
|
Else
|
||||||
|
MusicManager.Play(MusicLoop, False, 0.0F, False, "johto_wild")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
If BattleSystem.BattleScreen.RoamingBattle = True AndAlso BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop <> "" AndAlso MusicManager.SongExists(BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop) = True Then
|
If BattleSystem.BattleScreen.RoamingBattle = True AndAlso BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop <> "" AndAlso MusicManager.SongExists(BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop) = True Then
|
||||||
MusicManager.Play(MusicLoop, True, 0.0F, False, BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop)
|
MusicManager.Play(MusicLoop, True, 0.0F, False, BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop)
|
||||||
Else
|
Else
|
||||||
|
@ -528,10 +527,10 @@
|
||||||
MusicManager.Play(MusicLoop, False, 0.0F, False, "johto_wild")
|
MusicManager.Play(MusicLoop, False, 0.0F, False, "johto_wild")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
MusicManager.Play(MusicLoop, True, 0.0F, False, BattleSystem.BattleScreen.CustomBattleMusic)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
MusicManager.Play(MusicLoop, True, 0.0F, False, BattleSystem.BattleScreen.CustomBattleMusic)
|
||||||
End If
|
End If
|
||||||
If Not MusicLoop Is Nothing Then
|
If Not MusicLoop Is Nothing Then
|
||||||
Me.duration = MusicManager.GetSong(MusicLoop).Duration
|
Me.duration = MusicManager.GetSong(MusicLoop).Duration
|
||||||
|
|
Loading…
Reference in New Issue