mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Replaced != string.Empty with string.IsNullOrEmpty() in NHGameOverManager
This commit is contained in:
parent
0b65c852d2
commit
3cae688e2c
@ -165,13 +165,13 @@ namespace NewHorizons.Components
|
||||
|
||||
// Patch new music clip
|
||||
var musicSource = Locator.FindObjectsOfType<OWAudioSource>().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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user