Added argument to play a song that doesn't loop

This commit is contained in:
JappaWakka 2022-10-18 16:02:28 +02:00
parent d74103073d
commit 57e145b668
2 changed files with 14 additions and 3 deletions

View File

@ -321,6 +321,7 @@ Public Class MusicManager
End Sub
Public Shared Sub [Stop]()
Playlist.Clear()
MusicManager.Play(NO_MUSIC, False, 0.0F)
_isIntroStarted = False
End Sub

View File

@ -12,10 +12,20 @@
Select Case command.ToLower()
Case "play"
MusicManager.Play(argument, True)
Dim LoopSong As Boolean = True
If argument.Split(",").Length > 1 Then
LoopSong = CBool(argument.GetSplit(1, ","))
End If
MusicManager.Play(argument.GetSplit(0, ","), LoopSong, LoopSong)
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Screen.Level.MusicLoop = argument
If LoopSong = True Then
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Screen.Level.MusicLoop = argument
End If
Else
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Screen.Level.MusicLoop = "silence"
End If
End If
Case "forceplay"
MusicManager.ClearCurrentlyPlaying()