Skip to content

Commit

Permalink
fix: Fix Nautilus not compiling for BZ (Thanks to Biome Handler) (#514)
Browse files Browse the repository at this point in the history
Fix Nautilus not compiling for BZ
  • Loading branch information
LeeTwentyThree committed Dec 19, 2023
1 parent 07af00d commit ac10add
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Nautilus/Handlers/BiomeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static void RegisterBiome(string name, WaterscapeVolume.Settings settings
BiomePatcher.RegisterBiome(new BiomePatcher.CustomBiomeData(name, settings, sky));
}

#if SUBNAUTICA
/// <summary>
/// Adds music that plays in the given biome(s). The sound emitter is played when the given conditions are ended, until those conditions are no longer true, and then a fadeout is allowed.
/// </summary>
Expand All @@ -30,6 +31,7 @@ public static void AddBiomeMusic(string biomeName, FMODAsset musicAsset, FMODGam
{
BiomePatcher.RegisterBiomeSoundData(new BiomePatcher.CustomBiomeSoundData(BiomePatcher.CustomBiomeSoundData.Type.Music, biomeName, musicAsset, interiorState));
}
#endif

/// <summary>
/// Adds an ambient sound that plays in the given biome(s). The sound emitter is played when the given conditions are ended, until those conditions are no longer true, and then a fadeout is allowed.
Expand Down
2 changes: 2 additions & 0 deletions Nautilus/Patchers/BiomePatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ internal static void AddBiomeSoundEmitterToWaterAmbience(WaterAmbience waterAmbi
emitterObject.transform.parent = parent;
var emitter = emitterObject.AddComponent<FMOD_CustomLoopingEmitter>();
emitter.SetAsset(biomeSoundData.SoundAsset);
#if SUBNAUTICA
emitter.stopImmediatelyOnDisable = true;
#endif
var gameParams = emitterObject.AddComponent<FMODGameParams>();
gameParams.loopingEmitter = emitter;
gameParams.onlyInBiome = biomeSoundData.BiomeName;
Expand Down

0 comments on commit ac10add

Please sign in to comment.