Skip to content

Commit

Permalink
Fix interpreting music dict wrong, cut intro song off if too long (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee authored Sep 30, 2023
1 parent d78fc83 commit 0b006ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion YAMS-LIB/MusicShuffle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void ShuffleMusic(string musicDirectory, Dictionary<string, string
musicFile.MoveTo(musicFile.FullName + "_");

// Then we go through each song in the dictionary
foreach ((var origSongName, var newSongName) in musicDict)
foreach ((var newSongName, var origSongName) in musicDict)
{
if (File.Exists(musicDirectory + "/" + origSongName + "_"))
File.Move(musicDirectory + "/" + origSongName + "_", musicDirectory + "/" + newSongName);
Expand Down
3 changes: 3 additions & 0 deletions YAMS-LIB/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,9 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te

// Shuffle Music
MusicShuffle.ShuffleMusic(Path.GetDirectoryName(outputAm2rPath), seedObject.Cosmetics.MusicShuffleDict);
// Fix annoying overlapping songs when fanfare is long song.
PrependGMLInCode(gmData.Code.ByName("gml_Object_oMusicV2_Alarm_0"), "if (sfx_isplaying(musFanfare)) audio_stop_sound(musFanfare)");
ReplaceGMLInCode(gmData.Code.ByName("gml_Script_mus_intro_fanfare"), "alarm[0] = 60", "alarm[0] = 330");


// Create new wisdom septogg object
Expand Down

0 comments on commit 0b006ac

Please sign in to comment.