This commit is contained in:
Noah Pilarski 2025-01-25 06:29:26 -05:00
parent a8f48fcb54
commit b61ea5aaec
2 changed files with 12 additions and 7 deletions

View File

@ -16,16 +16,21 @@ namespace NewHorizons.Handlers
private static Dictionary<string, AudioType> _customAudioTypes;
private static List<AudioLibrary.AudioEntry> _audioEntries;
public static void Init()
public static void Init(bool titleScreen = false)
{
_customAudioTypes = new Dictionary<string, AudioType>();
_audioEntries = new List<AudioLibrary.AudioEntry>();
Delay.RunWhenAndInNUpdates(
PostInit,
() => Locator.GetAudioManager()?._libraryAsset != null,
1
);
if (titleScreen)
Delay.RunWhenAndInNUpdates(
PostInit,
() => Locator.GetAudioManager()?._libraryAsset != null,
1
);
else
Delay.RunWhen(() => Locator.GetAudioManager()?._libraryAsset != null,
PostInit
);
}
private static void PostInit()

View File

@ -422,7 +422,7 @@ namespace NewHorizons
if (isTitleScreen && CustomTitleScreen)
{
AudioTypeHandler.Init();
AudioTypeHandler.Init(true);
try
{