diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-23 14:40:19 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-23 14:40:19 -0500 |
commit | 5e97a2cc97edd63d2ffd6d08f3b3336104501014 (patch) | |
tree | 0c65db294b3684f574d9009c17d0288198bdbb5d | |
parent | c0ad40a3d43e83f35432d12e8b55d90c1865c264 (diff) | |
download | manifold-garden-archipelago-5e97a2cc97edd63d2ffd6d08f3b3336104501014.tar.gz manifold-garden-archipelago-5e97a2cc97edd63d2ffd6d08f3b3336104501014.tar.bz2 manifold-garden-archipelago-5e97a2cc97edd63d2ffd6d08f3b3336104501014.zip |
Mandala room can be used for fast travel
-rw-r--r-- | GameplayPatches.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/GameplayPatches.cs b/GameplayPatches.cs index 3090a98..bdcbcae 100644 --- a/GameplayPatches.cs +++ b/GameplayPatches.cs | |||
@@ -353,4 +353,40 @@ namespace ManifoldGardenArchipelago | |||
353 | } | 353 | } |
354 | } | 354 | } |
355 | } | 355 | } |
356 | |||
357 | [HarmonyPatch(typeof(MiniatureWorldButton), "IInteractable.OnLookAt")] | ||
358 | static class MiniatureWorldButtonOnLookAtPatch | ||
359 | { | ||
360 | static bool Prefix(MiniatureWorldButton __instance, ref bool __result) | ||
361 | { | ||
362 | __result = | ||
363 | !GameManager.DarkModeController.IsDarkMode && | ||
364 | GameManager.MandalaManager.LevelsActiveInMandala.Contains(__instance.LevelToGoIntoName) && | ||
365 | __instance.myMandalaController.myGravityDirection == GameManager.PlayerController.gravityDirection; | ||
366 | return false; | ||
367 | } | ||
368 | } | ||
369 | |||
370 | [HarmonyPatch(typeof(MiniatureWorldButton), "IInteractable.CanInteract")] | ||
371 | static class MiniatureWorldButtonCanInteractPatch | ||
372 | { | ||
373 | static bool Prefix(MiniatureWorldButton __instance, ref bool __result) | ||
374 | { | ||
375 | __result = | ||
376 | !GameManager.DarkModeController.IsDarkMode && | ||
377 | GameManager.MandalaManager.LevelsActiveInMandala.Contains(__instance.LevelToGoIntoName) && | ||
378 | __instance.myMandalaController.myGravityDirection == GameManager.PlayerController.gravityDirection; | ||
379 | return false; | ||
380 | } | ||
381 | } | ||
382 | |||
383 | [HarmonyPatch(typeof(MiniatureWorldButton), "IInteractable.OnInteract")] | ||
384 | static class MiniatureWorldButtonOnInteractPatch | ||
385 | { | ||
386 | static bool Prefix(MiniatureWorldButton __instance) | ||
387 | { | ||
388 | __instance.myMandalaController.ShrinkIntoLevel(__instance); | ||
389 | return false; | ||
390 | } | ||
391 | } | ||
356 | } | 392 | } |