Use G to make it easier to expose functions

This commit is contained in:
Emik 2026-02-17 23:24:10 +01:00
parent d5bccce8e7
commit 03eb8d1c3b
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
3 changed files with 2 additions and 9 deletions

View file

@ -327,7 +327,7 @@ 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 _ = type(G.calc) == "function" and G.calc(f(context):keys():conjoin(", "))
local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities
-- Normally unreachable since we set it to nil ourselves,

View file

@ -120,8 +120,6 @@ joker {
},
}
end,
calculate = function(_, _, context)
end,
Bakery_can_use = function(_, card)
return not card.debuff and u() and (
#G.GAME.tags ~= 0 or
@ -659,8 +657,3 @@ 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

@ -63,7 +63,7 @@ function SMODS.current_mod.config_tab()
}
end
SMODS.current_mod.optional_features = function()
function SMODS.current_mod.optional_features()
return {cardareas = {deck = true, unscored = true}}
end