mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Update SystemCreationHandler.cs
This commit is contained in:
parent
8fcc64e446
commit
90b5a05f41
@ -32,6 +32,11 @@ namespace NewHorizons.Handlers
|
||||
if (!string.IsNullOrEmpty(system.Config.travelAudioClip))
|
||||
{
|
||||
clip = SearchUtilities.FindResourceOfTypeAndName<AudioClip>(system.Config.travelAudioClip);
|
||||
|
||||
if (clip == null)
|
||||
{
|
||||
Logger.LogError($"Couldn't get audio from clip [{system.Config.travelAudioClip}]");
|
||||
}
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(system.Config.travelAudioFilePath))
|
||||
{
|
||||
@ -40,6 +45,11 @@ namespace NewHorizons.Handlers
|
||||
clip = AudioUtilities.LoadAudio(system.Mod.ModHelper.Manifest.ModFolderPath + "/" + system.Config.travelAudioFilePath);
|
||||
}
|
||||
catch { }
|
||||
|
||||
if (clip == null)
|
||||
{
|
||||
Logger.LogError($"Couldn't get audio from file [{system.Config.travelAudioFilePath}]");
|
||||
}
|
||||
}
|
||||
|
||||
if (clip != null)
|
||||
@ -51,10 +61,6 @@ namespace NewHorizons.Handlers
|
||||
travelSource._clipSelectionOnPlay = OWAudioSource.ClipSelectionOnPlay.MANUAL;
|
||||
travelSource.clip = clip;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogError($"Couldn't get audio from clip [{system.Config.travelAudioClip}] or file [{system.Config.travelAudioFilePath}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user