mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 00:04:33 +02:00
fixed bug with kanto wild battle music at night
This commit is contained in:
parent
396f2b37ee
commit
d7735f33ba
@ -42,7 +42,7 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If World.IsNight() Then
|
If ShouldPlayNightTheme() Then
|
||||||
musicLoop = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night_intro"
|
musicLoop = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night_intro"
|
||||||
'musicLoop = "kanto_wild_intro"
|
'musicLoop = "kanto_wild_intro"
|
||||||
End If
|
End If
|
||||||
@ -65,7 +65,7 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If World.IsNight() Then
|
If ShouldPlayNightTheme() Then
|
||||||
MusicLoop = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night_intro"
|
MusicLoop = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night_intro"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -625,14 +625,14 @@
|
|||||||
ElseIf battleType = BattleIntroScreen.BattleType.SAFARI Then
|
ElseIf battleType = BattleIntroScreen.BattleType.SAFARI Then
|
||||||
fallbackLoopSong = "johto_wild"
|
fallbackLoopSong = "johto_wild"
|
||||||
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild"
|
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild"
|
||||||
If World.IsNight() Then
|
If ShouldPlayNightTheme() Then
|
||||||
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night"
|
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night"
|
||||||
fallbackLoopSong = "johto_wild_night"
|
fallbackLoopSong = "johto_wild_night"
|
||||||
End If
|
End If
|
||||||
ElseIf battleType = BattleIntroScreen.BattleType.BUG_CATCHING Then
|
ElseIf battleType = BattleIntroScreen.BattleType.BUG_CATCHING Then
|
||||||
fallbackLoopSong = "johto_wild"
|
fallbackLoopSong = "johto_wild"
|
||||||
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild"
|
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild"
|
||||||
If World.IsNight() Then
|
If ShouldPlayNightTheme() Then
|
||||||
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night"
|
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night"
|
||||||
fallbackLoopSong = "johto_wild_night"
|
fallbackLoopSong = "johto_wild_night"
|
||||||
End If
|
End If
|
||||||
@ -643,7 +643,7 @@
|
|||||||
ElseIf battleType = BattleIntroScreen.BattleType.WILD Then
|
ElseIf battleType = BattleIntroScreen.BattleType.WILD Then
|
||||||
fallbackLoopSong = "johto_wild"
|
fallbackLoopSong = "johto_wild"
|
||||||
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild"
|
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild"
|
||||||
If World.IsNight() Then
|
If ShouldPlayNightTheme() Then
|
||||||
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night"
|
loopSong = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_night"
|
||||||
fallbackLoopSong = "johto_wild_night"
|
fallbackLoopSong = "johto_wild_night"
|
||||||
End If
|
End If
|
||||||
@ -661,6 +661,10 @@
|
|||||||
Return startTime + duration < Date.Now
|
Return startTime + duration < Date.Now
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function ShouldPlayNightTheme() As Boolean
|
||||||
|
Return World.IsNight() And Screen.Level.CurrentRegion = "Johto"
|
||||||
|
End Function
|
||||||
|
|
||||||
'Protected Overrides Sub Finalize()
|
'Protected Overrides Sub Finalize()
|
||||||
' If blurTexture IsNot Nothing
|
' If blurTexture IsNot Nothing
|
||||||
' blurTexture.Dispose()
|
' blurTexture.Dispose()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user