diff --git a/NewHorizons/Builder/Body/SingularityBuilder.cs b/NewHorizons/Builder/Body/SingularityBuilder.cs index 51ba247f..ad94374e 100644 --- a/NewHorizons/Builder/Body/SingularityBuilder.cs +++ b/NewHorizons/Builder/Body/SingularityBuilder.cs @@ -197,7 +197,15 @@ namespace NewHorizons.Builder.Body sphereCollider.isTrigger = true; if (sizeController != null) sizeController.sphereCollider = sphereCollider; - if (hasDestructionVolume) destructionVolumeGO.AddComponent(); + var audio = destructionVolumeGO.AddComponent(); + audio.spatialBlend = 1f; + audio.maxDistance = distort * 2.5f; + destructionVolumeGO.AddComponent(); + + if (hasDestructionVolume) + { + destructionVolumeGO.AddComponent(); + } else if (targetStarSystem != null) { var wormholeVolume = destructionVolumeGO.AddComponent(); diff --git a/NewHorizons/Components/Volumes/BlackHoleDestructionVolume.cs b/NewHorizons/Components/Volumes/BlackHoleDestructionVolume.cs index e5489760..e264221b 100644 --- a/NewHorizons/Components/Volumes/BlackHoleDestructionVolume.cs +++ b/NewHorizons/Components/Volumes/BlackHoleDestructionVolume.cs @@ -1,21 +1,28 @@ using NewHorizons.OtherMods.AchievementsPlus.NH; +using UnityEngine; namespace NewHorizons.Components.Volumes { public class BlackHoleDestructionVolume : DestructionVolume { + protected OWAudioSource _audio; + public override void Awake() { base.Awake(); _deathType = DeathType.BlackHole; + _audio = GetComponent(); } public override void VanishProbe(OWRigidbody probeBody, RelativeLocationData entryLocation) { - SurveyorProbe requiredComponent = probeBody.GetRequiredComponent(); - if (requiredComponent.IsLaunched()) + var probe = probeBody.GetRequiredComponent(); + + _audio.PlayOneShot(AudioType.BH_BlackHoleEmission, 1f); + + if (probe.IsLaunched()) { - Destroy(requiredComponent.gameObject); + Destroy(probe.gameObject); ProbeLostAchievement.Earn(); } } diff --git a/NewHorizons/Components/Volumes/BlackHoleWarpVolume.cs b/NewHorizons/Components/Volumes/BlackHoleWarpVolume.cs index 58202aa1..bd99fee5 100644 --- a/NewHorizons/Components/Volumes/BlackHoleWarpVolume.cs +++ b/NewHorizons/Components/Volumes/BlackHoleWarpVolume.cs @@ -17,6 +17,7 @@ namespace NewHorizons.Components.Volumes public override void VanishPlayer(OWRigidbody playerBody, RelativeLocationData entryLocation) { + Locator.GetPlayerAudioController().PlayOneShotInternal(AudioType.BH_BlackHoleEmission); Main.Instance.ChangeCurrentStarSystem(TargetSolarSystem, PlayerState.AtFlightConsole()); } }