diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-24 15:24:56 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-24 15:24:56 -0500 |
| commit | b5dc753b6a74c8fb98ff35a348c286df24c3248e (patch) | |
| tree | 8889b9029133006242113645a561c1e02efd0e1a | |
| parent | 6494004f64d93381768e95eec04a886ac53df838 (diff) | |
| download | manifold-garden-archipelago-b5dc753b6a74c8fb98ff35a348c286df24c3248e.tar.gz manifold-garden-archipelago-b5dc753b6a74c8fb98ff35a348c286df24c3248e.tar.bz2 manifold-garden-archipelago-b5dc753b6a74c8fb98ff35a348c286df24c3248e.zip | |
Fix rainbow tree not growing
| -rw-r--r-- | GameplayPatches.cs | 14 |
1 files changed, 12 insertions, 2 deletions
| diff --git a/GameplayPatches.cs b/GameplayPatches.cs index 37a671d..b2b8e54 100644 --- a/GameplayPatches.cs +++ b/GameplayPatches.cs | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | using HarmonyLib; | 1 | using HarmonyLib; |
| 2 | using System.Reflection; | 2 | using System.Reflection; |
| 3 | using UnityEngine; | 3 | using UnityEngine; |
| 4 | using static ManifoldGardenArchipelago.Requirement; | ||
| 4 | 5 | ||
| 5 | namespace ManifoldGardenArchipelago | 6 | namespace ManifoldGardenArchipelago |
| 6 | { | 7 | { |
| @@ -271,9 +272,18 @@ namespace ManifoldGardenArchipelago | |||
| 271 | [HarmonyPatch(typeof(DarkModeCollapsedCubeWorldGrow), nameof(DarkModeCollapsedCubeWorldGrow.OnChainFillComplete))] | 272 | [HarmonyPatch(typeof(DarkModeCollapsedCubeWorldGrow), nameof(DarkModeCollapsedCubeWorldGrow.OnChainFillComplete))] |
| 272 | static class DarkModeCollapsedCubeWorldGrowOnChainFillCompletePatch | 273 | static class DarkModeCollapsedCubeWorldGrowOnChainFillCompletePatch |
| 273 | { | 274 | { |
| 274 | static bool Prefix() | 275 | static bool Prefix(DarkModeCollapsedCubeWorldGrow __instance) |
| 275 | { | 276 | { |
| 276 | return false; | 277 | SceneItemReference sir = GameState.GetChainListenerSceneReference(__instance); |
| 278 | |||
| 279 | if (GameData.scenes.TryGetValue(sir.scene, out var sceneDescription) && | ||
| 280 | sceneDescription.worldGrows.TryGetValue(sir.index, out var requirement) && | ||
| 281 | requirement.Check() != Requirement.Decision.Yes) | ||
| 282 | { | ||
| 283 | return false; | ||
| 284 | } | ||
| 285 | |||
| 286 | return true; | ||
| 277 | } | 287 | } |
| 278 | } | 288 | } |
| 279 | 289 | ||
