diff --git a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs index f3980776..4d2d32ce 100644 --- a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs +++ b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs @@ -365,6 +365,15 @@ namespace NewHorizons.Builder.Props var success = PairEntrance(innerFogWarpVolume, config.linksTo); if (!success) RecordUnpairedNode(innerFogWarpVolume, config.linksTo); + if (config.preventRecursionCrash) + { + Delay.FireOnNextUpdate(() => + { + var destination = GetOuterFogWarpVolumeFromAstroObject(AstroObjectLocator.GetAstroObject(config.linksTo).gameObject); + if (destination != null) destination._senderWarps.Remove(innerFogWarpVolume); + }); + } + // Cleanup for dimension exits if (config.name != null) { diff --git a/NewHorizons/External/Modules/BrambleModule.cs b/NewHorizons/External/Modules/BrambleModule.cs index c3405e37..9b98c0de 100644 --- a/NewHorizons/External/Modules/BrambleModule.cs +++ b/NewHorizons/External/Modules/BrambleModule.cs @@ -134,6 +134,12 @@ namespace NewHorizons.External.Modules /// public int[] possibleExits; + /// + /// If your game hard crashes upon entering bramble, it's most likely because you have indirectly recursive dimensions, i.e. one leads to another that leads back to the first one. + /// Set this to true for one of the nodes in the recursion to fix this, at the cost of it no longer showing markers for the scout, ship, etc. + /// + [DefaultValue(false)] public bool preventRecursionCrash = false; + #region Obsolete [Obsolete("farFogTint is deprecated, please use fogTint instead")]