Cleanup
This commit is contained in:
parent
4c467c4e68
commit
d5bccce8e7
4 changed files with 50 additions and 41 deletions
|
|
@ -341,9 +341,8 @@ return {
|
||||||
b_Roland_bye = "Bye!",
|
b_Roland_bye = "Bye!",
|
||||||
b_Roland_comma = ", ",
|
b_Roland_comma = ", ",
|
||||||
b_Roland_entering_shop = "Entering shop!",
|
b_Roland_entering_shop = "Entering shop!",
|
||||||
b_Roland_debug_export = "(Debug) Expose helpers",
|
b_Roland_debug_export = "Debug: Import functional.lua",
|
||||||
b_Roland_escapey_debugger = "(Debug) Escapey prints context",
|
b_Roland_equinox_assist = "Assist: Only hide text during Equinox",
|
||||||
b_Roland_equinox_assist = "(Assist) Only hide text during Equinox Blind",
|
|
||||||
b_Roland_most_common_card = "(Rank)",
|
b_Roland_most_common_card = "(Rank)",
|
||||||
b_Roland_na = "N/A",
|
b_Roland_na = "N/A",
|
||||||
b_Roland_of = " of ",
|
b_Roland_of = " of ",
|
||||||
|
|
|
||||||
|
|
@ -325,6 +325,39 @@ if cry_prob then
|
||||||
end
|
end
|
||||||
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 {
|
blind {
|
||||||
key = "equinox",
|
key = "equinox",
|
||||||
boss = {min = 6},
|
boss = {min = 6},
|
||||||
|
|
@ -470,44 +503,14 @@ local venerable_visage = blind {
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local orig_update = Game.update
|
local orig_game_draw = Game.draw
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function Game.update(...)
|
function Game.draw(...)
|
||||||
orig_update(...)
|
orig_game_draw(...)
|
||||||
|
local boss_colour = venerable_visage.boss_colour
|
||||||
|
|
||||||
local boss_colour = (venerable_visage or {}).boss_colour
|
if type(boss_colour) == "table" then
|
||||||
|
|
||||||
if boss_colour then
|
|
||||||
boss_colour[1], boss_colour[2], boss_colour[3] = hsv_to_rgb(os.clock() / 6 % 1, 0.25, 0.75)
|
boss_colour[1], boss_colour[2], boss_colour[3] = hsv_to_rgb(os.clock() / 6 % 1, 0.25, 0.75)
|
||||||
end
|
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ joker {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
calculate = function(_, _, context)
|
calculate = function(_, _, context)
|
||||||
local _ = type(G.escapey_debugger) == "function" and G.escapey_debugger(f(context):keys():conjoin(", "))
|
|
||||||
end,
|
end,
|
||||||
Bakery_can_use = function(_, card)
|
Bakery_can_use = function(_, card)
|
||||||
return not card.debuff and u() and (
|
return not card.debuff and u() and (
|
||||||
|
|
@ -660,3 +659,8 @@ joker {
|
||||||
end
|
end
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ SMODS.Atlas {
|
||||||
path = "icon.png",
|
path = "icon.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
SMODS.current_mod.config_tab = function()
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
function SMODS.current_mod.config_tab()
|
||||||
return {
|
return {
|
||||||
n = G.UIT.ROOT,
|
n = G.UIT.ROOT,
|
||||||
config = {r = 0.1, minw = 4, minh = 4, align = "tr", padding = 0.2, colour = G.C.BLACK},
|
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"},
|
label = localize {type = "variable", key = "b_Roland_equinox_assist"},
|
||||||
ref_table = SMODS.Mods.Roland.config,
|
ref_table = SMODS.Mods.Roland.config,
|
||||||
ref_value = "equinox_assist",
|
ref_value = "equinox_assist",
|
||||||
|
scale = 2,
|
||||||
},
|
},
|
||||||
SMODS.Mods.DebugPlus and UIBox_button {
|
SMODS.Mods.DebugPlus and UIBox_button {
|
||||||
label = {localize {type = "variable", key = "b_Roland_debug_export"}},
|
label = {localize {type = "variable", key = "b_Roland_debug_export"}},
|
||||||
|
|
@ -53,7 +55,8 @@ SMODS.current_mod.config_tab = function()
|
||||||
button = "Roland_debug_export",
|
button = "Roland_debug_export",
|
||||||
colour = G.C.MULT,
|
colour = G.C.MULT,
|
||||||
col = true,
|
col = true,
|
||||||
scale = 8,
|
scale = 5,
|
||||||
|
minw = 5,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue