mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
reset audio entries array after building so we dont just keep appending over and over
This commit is contained in:
parent
31900209f3
commit
39f1542e22
@ -30,9 +30,10 @@ namespace NewHorizons.Handlers
|
||||
Logger.LogVerbose($"Adding all custom AudioTypes to the library");
|
||||
|
||||
var library = Locator.GetAudioManager()._libraryAsset;
|
||||
library.audioEntries = library.audioEntries.Concat(_audioEntries).ToArray();
|
||||
|
||||
var audioEntries = library.audioEntries; // store previous array
|
||||
library.audioEntries = library.audioEntries.Concat(_audioEntries).ToArray(); // concat custom entries
|
||||
Locator.GetAudioManager()._audioLibraryDict = library.BuildAudioEntryDictionary();
|
||||
library.audioEntries = audioEntries; // reset it back for next time we build
|
||||
}
|
||||
|
||||
// Will return an existing audio type or create a new one for the given audio string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user