From 43113e16e25d9b73775e740682802ca168c950d7 Mon Sep 17 00:00:00 2001 From: Emik Date: Fri, 28 Mar 2025 16:25:38 +0100 Subject: [PATCH] Do not run check outside of in-game --- manifest.json | 2 +- src/main.lua | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/manifest.json b/manifest.json index ac84076..7c36321 100644 --- a/manifest.json +++ b/manifest.json @@ -12,5 +12,5 @@ "Bakery (>=0.1.26~*)" ], "conflicts": ["Jen"], - "version": "0.2.2" + "version": "0.2.3" } \ No newline at end of file diff --git a/src/main.lua b/src/main.lua index 03a2db3..f8dcf38 100644 --- a/src/main.lua +++ b/src/main.lua @@ -339,18 +339,23 @@ function Game:update(dt) G.P_BLINDS["bl_jane_wee"].mult = 22 / blind G.P_BLINDS["bl_jane_descending"].mult = math.floor(8 * math.sqrt(blind)) / blind - while true do + while G.GAME do local honey = SMODS.find_card("j_jane_honey") local first = find_uncorrupted(honey, 1) - local second = find_uncorrupted(honey, first) - if second then - honey[first].sell_cost = v.sell_cost + honey[second].sell_cost - honey[first].ability.extra.is_corrupted = true - honey[second]:start_dissolve() - else + if not first then break end + + local second = find_uncorrupted(honey, first) + + if not second then + break + end + + honey[first].sell_cost = v.sell_cost + honey[second].sell_cost + honey[first].ability.extra.is_corrupted = true + honey[second]:start_dissolve() end if not Jane.bans_done then