do ambience too because might as well

This commit is contained in:
Noah Pilarski 2025-01-25 06:36:19 -05:00
parent b61ea5aaec
commit c726b089e8
2 changed files with 13 additions and 1 deletions

View File

@ -40,10 +40,15 @@ namespace NewHorizons.External.Configs
public SkyboxModule Skybox;
/// <summary>
/// Relative path to music to replace the title screen music with.
/// The music audio that will play on the title screen. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
/// </summary>
public string music;
/// <summary>
/// The ambience audio that will play on the title screen. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
/// </summary>
public string ambience;
/// <summary>
/// Changes the speed the main menu planet and the skybox rotates.
/// </summary>

View File

@ -60,6 +60,13 @@ namespace NewHorizons.Handlers
Delay.FireOnNextUpdate(() => musicSource.AssignAudioLibraryClip(audioType));
}
if (!string.IsNullOrEmpty(config.ambience))
{
var ambienceSource = SearchUtilities.Find("Scene/AudioSource_Ambience").GetComponent<OWAudioSource>();
var audioType = AudioTypeHandler.GetAudioType(config.ambience, mod);
Delay.FireOnNextUpdate(() => ambienceSource.AssignAudioLibraryClip(audioType));
}
if (config.MenuPlanet != null)
{
if (config.MenuPlanet.destroyMenuPlanet)