Add debug options

This commit is contained in:
Emik 2026-02-11 19:21:05 +01:00
parent 4fe62bba97
commit e77763afa0
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
4 changed files with 34 additions and 12 deletions

View file

@ -1 +1 @@
return {["equinox_assist"] = false}
return {escapey_debugger = false, equinox_assist = false}

View file

@ -297,6 +297,9 @@ 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_most_common_card = "(Rank)",
b_Roland_na = "N/A",
b_Roland_of = " of ",

View file

@ -222,10 +222,6 @@ joker {
level_up(v, 1, card)
end)
end,
debug_export = function(self, obj)
local to = obj or self
to.f, to.q, to.u = f, q, u
end,
}
joker {

View file

@ -24,15 +24,38 @@ end
SMODS.current_mod.config_tab = function()
return {
n = G.UIT.ROOT,
config = {r = 0.1, minw = 8, minh = 6, align = "tl", padding = 0.2, colour = G.C.BLACK},
config = {r = 0.1, minw = 4, minh = 4, align = "tr", padding = 0.2, colour = G.C.BLACK},
nodes = {{
n = G.UIT.C,
config = {minw = 1, minh = 1, align = "tl", colour = G.C.CLEAR, padding = 0.15},
nodes = {create_toggle({
label = "Assist: Only hide text during Equinox Blind",
ref_table = SMODS.Mods.Roland.config,
ref_value = "equinox_assist",
})},
config = {minw = 1, minh = 1, align = "tr", padding = 0.2, colour = G.C.CLEAR},
nodes = {
create_toggle {
label = localize {type = "variable", key = "b_Roland_equinox_assist"},
ref_table = SMODS.Mods.Roland.config,
ref_value = "equinox_assist",
},
SMODS.Mods.DebugPlus and create_toggle {
label = localize {type = "variable", key = "b_Roland_escapey_debugger"},
ref_table = SMODS.Mods.Roland.config,
ref_value = "escapey_debugger",
callback = function(v)
G.escapey_debugger = v and print or nil
end,
},
SMODS.Mods.DebugPlus and UIBox_button {
label = {localize {type = "variable", key = "b_Roland_debug_export"}},
func = G.P_CENTERS.j_Roland_escapey.debug_export,
button = "Roland_debug_export",
colour = G.C.MULT,
col = true,
scale = 8,
},
},
}},
}
end
function G.FUNCS.Roland_debug_export(_, tbl)
local to = tbl or _G
to.f, to.q, to.u = unpack(qol)
end