This commit is contained in:
Emik 2026-02-17 22:41:20 +01:00
parent 4c467c4e68
commit d5bccce8e7
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
4 changed files with 50 additions and 41 deletions

View file

@ -341,9 +341,8 @@ return {
b_Roland_bye = "Bye!",
b_Roland_comma = ", ",
b_Roland_entering_shop = "Entering shop!",
b_Roland_debug_export = "(Debug) Expose helpers",
b_Roland_escapey_debugger = "(Debug) Escapey prints context",
b_Roland_equinox_assist = "(Assist) Only hide text during Equinox Blind",
b_Roland_debug_export = "Debug: Import functional.lua",
b_Roland_equinox_assist = "Assist: Only hide text during Equinox",
b_Roland_most_common_card = "(Rank)",
b_Roland_na = "N/A",
b_Roland_of = " of ",

View file

@ -325,6 +325,39 @@ if cry_prob then
end
end
function SMODS.current_mod:calculate(context)
---@diagnostic disable-next-line: undefined-global
local _ = type(Roland_calculate) == "function" and Roland_calculate(qol[1](context):keys():conjoin(", "))
local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities
-- Normally unreachable since we set it to nil ourselves,
-- but other mods may want to use this modifier.
if improbable == false then
disable_improbable()
return
end
if not improbable or getmetatable(orig) then
return
end
local normal = orig.normal
local mt = {
orig = orig,
__index = function(_, k)
return k == "normal" and 0 or orig[k]
end,
__newindex = function(_, k, v)
orig[k] = (k == "normal" and v == 0) and normal or v
end,
}
local proxy = {}
setmetatable(proxy, mt)
G.GAME.probabilities = proxy
end
blind {
key = "equinox",
boss = {min = 6},
@ -470,44 +503,14 @@ local venerable_visage = blind {
end,
}
local orig_update = Game.update
local orig_game_draw = Game.draw
---@diagnostic disable-next-line: duplicate-set-field
function Game.update(...)
orig_update(...)
function Game.draw(...)
orig_game_draw(...)
local boss_colour = venerable_visage.boss_colour
local boss_colour = (venerable_visage or {}).boss_colour
if boss_colour then
if type(boss_colour) == "table" then
boss_colour[1], boss_colour[2], boss_colour[3] = hsv_to_rgb(os.clock() / 6 % 1, 0.25, 0.75)
end
local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities
-- Normally unreachable since we set it to nil ourselves,
-- but other mods may want to use this modifier.
if improbable == false then
disable_improbable()
return
end
if not improbable or getmetatable(orig) then
return
end
local normal = orig.normal
local mt = {
orig = orig,
__index = function(_, k)
return k == "normal" and 0 or orig[k]
end,
__newindex = function(_, k, v)
orig[k] = (k == "normal" and v == 0) and normal or v
end,
}
local proxy = {}
setmetatable(proxy, mt)
G.GAME.probabilities = proxy
end

View file

@ -121,7 +121,6 @@ joker {
}
end,
calculate = function(_, _, context)
local _ = type(G.escapey_debugger) == "function" and G.escapey_debugger(f(context):keys():conjoin(", "))
end,
Bakery_can_use = function(_, card)
return not card.debuff and u() and (
@ -660,3 +659,8 @@ joker {
end
end,
}
function SMODS.current_mod:calculate(context)
---@diagnostic disable-next-line: undefined-global
local _ = type(Roland_calculate) == "function" and Roland_calculate(qol[1](context):keys():conjoin(", "))
end

View file

@ -34,7 +34,8 @@ SMODS.Atlas {
path = "icon.png",
}
SMODS.current_mod.config_tab = function()
---@diagnostic disable-next-line: duplicate-set-field
function SMODS.current_mod.config_tab()
return {
n = G.UIT.ROOT,
config = {r = 0.1, minw = 4, minh = 4, align = "tr", padding = 0.2, colour = G.C.BLACK},
@ -46,6 +47,7 @@ SMODS.current_mod.config_tab = function()
label = localize {type = "variable", key = "b_Roland_equinox_assist"},
ref_table = SMODS.Mods.Roland.config,
ref_value = "equinox_assist",
scale = 2,
},
SMODS.Mods.DebugPlus and UIBox_button {
label = {localize {type = "variable", key = "b_Roland_debug_export"}},
@ -53,7 +55,8 @@ SMODS.current_mod.config_tab = function()
button = "Roland_debug_export",
colour = G.C.MULT,
col = true,
scale = 8,
scale = 5,
minw = 5,
},
},
}},