From e58b122fb00a337748df2de2451679f53b092d42 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 22 Feb 2025 10:43:41 -0500 Subject: Mapped out most of the game --- Plugin.cs | 49 ++----------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) (limited to 'Plugin.cs') diff --git a/Plugin.cs b/Plugin.cs index 50e6e2b..df53e96 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -1,7 +1,6 @@ using BepInEx; using BepInEx.Logging; using HarmonyLib; -using System.Linq; using System.Reflection; namespace ManifoldGardenArchipelago @@ -12,6 +11,7 @@ namespace ManifoldGardenArchipelago internal static new ManualLogSource Logger; public static ArchipelagoManager archipelagoManager = new(); + public static SlotSave slotSave = new(); private void Awake() { @@ -21,6 +21,7 @@ namespace ManifoldGardenArchipelago Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly()); + GameData.Load(); archipelagoManager.Connect("localhost:38281", "Manifold", "").RunSynchronously(); } } @@ -34,52 +35,6 @@ namespace ManifoldGardenArchipelago } } - [HarmonyPatch(typeof(LineDoorController), "SetDoorOpenCloseStateAnimated")] - static class LineDoorControllerSetDoorOpenCloseStateAnimatedPatch - { - static bool Prefix(LineDoorController __instance, bool open) - { - if (Plugin.archipelagoManager.chainListenersByScene.TryGetValue(__instance.gameObject.scene.name, out var activatedChainListeners)) - { - LevelSystems levelSystem = __instance.gameObject.scene.GetRootGameObjects().Single((obj) => obj.name == "Level Systems").GetComponent(); - - foreach (var listener in activatedChainListeners) - { - if (levelSystem.chainListeners[listener.Key] == __instance) - { - if (open != listener.Value) - { - return false; - } - } - } - } - - return true; - } - } - - [HarmonyPatch(typeof(LineDoorController), nameof(LineDoorController.OnLevelEnable))] - static class LineDoorControllerOnLevelEnablePatch - { - static void Prefix(LineDoorController __instance) - { - if (Plugin.archipelagoManager.chainListenersByScene.TryGetValue(__instance.gameObject.scene.name, out var activatedChainListeners)) - { - LevelSystems levelSystem = __instance.gameObject.scene.GetRootGameObjects().Single((obj) => obj.name == "Level Systems").GetComponent(); - - foreach (var listener in activatedChainListeners) - { - if (levelSystem.chainListeners[listener.Key] == __instance) - { - FieldInfo fieldInfo = typeof(LineDoorController).GetField("doorShouldOpenImmediatelyOnEnable", BindingFlags.Instance | BindingFlags.NonPublic); - fieldInfo.SetValue(__instance, listener.Value); - } - } - } - } - } - [HarmonyPatch(typeof(ButtonLineActivator), nameof(ButtonLineActivator.OnInteract))] static class ButtonLineActivatorOnInteractPatch { -- cgit 1.4.1