From 5e97a2cc97edd63d2ffd6d08f3b3336104501014 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 23 Feb 2025 14:40:19 -0500 Subject: Mandala room can be used for fast travel --- GameplayPatches.cs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/GameplayPatches.cs b/GameplayPatches.cs index 3090a98..bdcbcae 100644 --- a/GameplayPatches.cs +++ b/GameplayPatches.cs @@ -353,4 +353,40 @@ namespace ManifoldGardenArchipelago } } } + + [HarmonyPatch(typeof(MiniatureWorldButton), "IInteractable.OnLookAt")] + static class MiniatureWorldButtonOnLookAtPatch + { + static bool Prefix(MiniatureWorldButton __instance, ref bool __result) + { + __result = + !GameManager.DarkModeController.IsDarkMode && + GameManager.MandalaManager.LevelsActiveInMandala.Contains(__instance.LevelToGoIntoName) && + __instance.myMandalaController.myGravityDirection == GameManager.PlayerController.gravityDirection; + return false; + } + } + + [HarmonyPatch(typeof(MiniatureWorldButton), "IInteractable.CanInteract")] + static class MiniatureWorldButtonCanInteractPatch + { + static bool Prefix(MiniatureWorldButton __instance, ref bool __result) + { + __result = + !GameManager.DarkModeController.IsDarkMode && + GameManager.MandalaManager.LevelsActiveInMandala.Contains(__instance.LevelToGoIntoName) && + __instance.myMandalaController.myGravityDirection == GameManager.PlayerController.gravityDirection; + return false; + } + } + + [HarmonyPatch(typeof(MiniatureWorldButton), "IInteractable.OnInteract")] + static class MiniatureWorldButtonOnInteractPatch + { + static bool Prefix(MiniatureWorldButton __instance) + { + __instance.myMandalaController.ShrinkIntoLevel(__instance); + return false; + } + } } -- cgit 1.4.1