diff options
| -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 | } | 
