Add Terminal patch to make Hookah unlockable always available in shop

This commit is contained in:
ivan tkachenko 2026-04-10 20:55:35 +03:00
parent be62175767
commit b6f0901063
1 changed files with 22 additions and 0 deletions

View File

@ -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];
}
}
}