From 6a518ca7bdb787ef6d37469d26648afb8385c987 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 25 May 2024 15:37:05 -0400 Subject: Block access to terminal without Red Key --- AnodyneArchipelago/Patches/GameplayPatches.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'AnodyneArchipelago/Patches/GameplayPatches.cs') diff --git a/AnodyneArchipelago/Patches/GameplayPatches.cs b/AnodyneArchipelago/Patches/GameplayPatches.cs index ba33457..a6b572a 100644 --- a/AnodyneArchipelago/Patches/GameplayPatches.cs +++ b/AnodyneArchipelago/Patches/GameplayPatches.cs @@ -15,6 +15,7 @@ using AnodyneSharp.Dialogue; using AnodyneSharp.Sounds; using AnodyneSharp.States; using AnodyneSharp.Entities.Interactive.Npc; +using AnodyneSharp.MapData; namespace AnodyneArchipelago.Patches { @@ -321,4 +322,26 @@ namespace AnodyneArchipelago.Patches } } } + + [HarmonyPatch(typeof(PlayState), "Warp")] + class PlayWarpPatch + { + static void Postfix() + { + if (GlobalState.CURRENT_MAP_NAME == "FIELDS") + { + // Place a rock blocking access to Terminal without the red key. + PatchHelper.SetMapTile(31, 47, 11, Layer.BG); + } + } + } + + /*[HarmonyPatch(typeof(Player), "Movement")] + class PlayerMovementPatch + { + static void Postfix(Player __instance) + { + Plugin.Instance.Log.LogInfo($"Player pos: {GlobalState.Map.ToMapLoc(__instance.Position)}"); + } + }*/ } -- cgit 1.4.1