diff --git a/NewHorizons/Builder/Props/GeyserBuilder.cs b/NewHorizons/Builder/Props/GeyserBuilder.cs index f8784c3d..5b04150c 100644 --- a/NewHorizons/Builder/Props/GeyserBuilder.cs +++ b/NewHorizons/Builder/Props/GeyserBuilder.cs @@ -39,6 +39,7 @@ namespace NewHorizons.Builder.Props if (info.disableBubbles) bubbles.SetActive(false); if (info.disableShaft) shaft.SetActive(false); if (info.disableSpout) spout.SetActive(false); + var geyserController = geyserGO.GetComponent(); geyserController._activeDuration = info.activeDuration; geyserController._inactiveDuration = info.inactiveDuration; @@ -66,19 +67,21 @@ namespace NewHorizons.Builder.Props oneShotAudio.GetComponent().SetSector(sector); loopAudio.GetComponent().SetSector(sector); - // Someone might want a geyser just for its force maybe idk - if (info.disableSpout & info.disableShaft & info.disableBubbles) - { - oneShotAudio.SetActive(false); - loopAudio.SetActive(false); - } - // Disable start/end sounds if its just bubbles - else if (info.disableSpout & info.disableShaft) - { - oneShotAudio.SetActive(false); - } + Delay.FireOnNextUpdate(() => { + if (info.volume == 0) + { + oneShotAudio.SetActive(false); + loopAudio.SetActive(false); + } + else + { + oneShotAudio.GetComponent().SetMaxVolume(info.volume); + loopAudio.GetComponent().SetMaxVolume(info.volume); + } + }); + // If it starts at the shaft, move the start/end sounds to it - else if ((info.disableSpout & !info.disableShaft) | info.offset == -67f) + if ((info.disableSpout & !info.disableShaft) | info.offset == -67f) { oneShotAudio.transform.SetLocalPositionY(67f); } diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index c0a1db0e..52ab42c6 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -258,6 +258,11 @@ namespace NewHorizons.External.Modules /// Disable the individual particle systems of the geyser /// public bool disableBubbles, disableShaft, disableSpout; + + /// + /// Loudness of the geyser + /// + [DefaultValue(0.7f)] public float volume = 0.7f; } [JsonObject]