From b6f0901063e6b49668104f9640429667833c72d0 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Fri, 10 Apr 2026 20:55:35 +0300 Subject: [PATCH] Add Terminal patch to make Hookah unlockable always available in shop --- HookahPlace/src/TerminalPatch.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 HookahPlace/src/TerminalPatch.cs diff --git a/HookahPlace/src/TerminalPatch.cs b/HookahPlace/src/TerminalPatch.cs new file mode 100644 index 0000000..3bc44be --- /dev/null +++ b/HookahPlace/src/TerminalPatch.cs @@ -0,0 +1,22 @@ +using HarmonyLib; +using System.Linq; +using Dawn; + +namespace HookahPlace; + +[HarmonyPatch(typeof(Terminal))] +internal static class TerminalPatch +{ + [HarmonyPrefix] + [HarmonyPatch("Update")] + private static void UpdatePatch(Terminal __instance) + { + var hookahNode = LethalContent.Unlockables[HookahPlaceKeys.Hookah].UnlockableItem.shopSelectionNode; + + if (!__instance.ShipDecorSelection.Any(node => node.shipUnlockableID == hookahNode.shipUnlockableID)) + { + HookahPlace.Logger.LogInfo($"Patching terminal selection list {hookahNode.shipUnlockableID}"); + __instance.ShipDecorSelection = [.. __instance.ShipDecorSelection, hookahNode]; + } + } +}