diff --git a/config.lua b/config.lua index 0e3035b..3061d48 100644 --- a/config.lua +++ b/config.lua @@ -6,4 +6,5 @@ return { import_funky = false, no_highlight_limit = true, no_wild_debuff = true, + scribable_basket = false, } diff --git a/localization/en-us.lua b/localization/en-us.lua index 100f9b5..d2c69b1 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -406,6 +406,7 @@ return { b_Roland_fuse = "FUSE", b_Roland_equinox_assist = "Assist: Only hide text (Equinox)", b_Roland_fusable_escapey = "Fusable Escapey (overpowered)", + b_Roland_scribable_basket = "Scribable Basket (overpowered)", b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)", b_Roland_illusion_seal = "Allow seals from Illusion voucher", b_Roland_import_funky = "Debug: Import funky.lua", diff --git a/manifest.json b/manifest.json index d780aff..6059ed4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "author": [ "Emik" ], - "version": "2.2.8", + "version": "2.2.9", "badge_colour": "8BE9FD", "main_file": "src/main.lua", "badge_text_colour": "44475A", diff --git a/src/lib/funky.lua b/src/lib/funky.lua index 185fbda..990fd25 100644 --- a/src/lib/funky.lua +++ b/src/lib/funky.lua @@ -441,7 +441,7 @@ end ---@param func F|fun(v: V, k: K): boolean ---@return boolean|V ---@nodiscard ----@overload fun(self: F|{ [K]: V }, func: string): boolean|V +---@overload fun(self: F|{ [K]: V }, func: string?): boolean|V function f:any(func) func = type(func) == "string" and f.index(func) or func @@ -459,7 +459,7 @@ end ---@param func F|fun(v: V, k: K): boolean ---@return boolean|V ---@nodiscard ----@overload fun(self: F|{ [K]: V }, func: string): boolean|V +---@overload fun(self: F|{ [K]: V }, func: string?): boolean|V function f:all(func) func = type(func) == "string" and f.index(func) or func diff --git a/src/main.lua b/src/main.lua index 2e7b7cd..342c32d 100644 --- a/src/main.lua +++ b/src/main.lua @@ -61,6 +61,7 @@ function SMODS.current_mod.config_tab() toggle "no_highlight_limit", _G["Talisman"] and toggle "harsh_ante_scaling", toggle "fusable_escapey", + G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket", toggle "equinox_assist", SMODS.Mods.DebugPlus and toggle "import_funky", }, diff --git a/src/tweaks.lua b/src/tweaks.lua index 98fca9d..de01bfe 100644 --- a/src/tweaks.lua +++ b/src/tweaks.lua @@ -142,3 +142,18 @@ function get_blind_amount(ante, ...) (ante / 2 >= loop and big:new {blind(rem), ante / loop} or (big.constants and big.constants.TEN or big:new {10}):pow(blind(rem)))) end + +q(function() + if not G.P_CENTERS.c_Bakery_Scribe then + return + end + + local orig_can_use = G.P_CENTERS.c_Bakery_Scribe.can_use + + function G.P_CENTERS.c_Bakery_Scribe.can_use(...) + return orig_can_use(...) and + (SMODS.Mods.Roland.config.scribable_basket or f(G.jokers.highlighted):all(function(v) + return v.config.center.key ~= "j_Roland_basket" + end)) + end +end)