From 3cae688e2c14ece815b63ca77d00d3877317d74d Mon Sep 17 00:00:00 2001 From: josshmot Date: Fri, 11 Apr 2025 04:58:30 +1000 Subject: [PATCH] Replaced != string.Empty with string.IsNullOrEmpty() in NHGameOverManager --- NewHorizons/Components/NHGameOverManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Components/NHGameOverManager.cs b/NewHorizons/Components/NHGameOverManager.cs index acc3080d..1586755d 100644 --- a/NewHorizons/Components/NHGameOverManager.cs +++ b/NewHorizons/Components/NHGameOverManager.cs @@ -165,13 +165,13 @@ namespace NewHorizons.Components // Patch new music clip var musicSource = Locator.FindObjectsOfType().Where(x => x.name == "AudioSource").Single(); // AudioSource that plays the credits music is literally called "AudioSource", luckily it's the only one called that. Lazy OW devs do be lazy. - if (gameOver.audio != string.Empty) // string.Empty is default value for "audio" in GameOverModule, means no audio is specified. + if (string.IsNullOrEmpty(gameOver.audio)) // string.Empty is default value for "audio" in GameOverModule, means no audio is specified. { AudioUtilities.SetAudioClip(musicSource, gameOver.audio, mod); // Load audio if specified } else { - musicSource.AssignAudioLibraryClip(AudioType.PLACEHOLDER); // Otherwise default custom credits are silent + musicSource.AssignAudioLibraryClip(AudioType.PLACEHOLDER); // Otherwise default custom credits are silent - AudioType.PLACEHOLDER is silence (apparently) } musicSource.loop = gameOver.audioLooping;