Add G.calckeys and G.calccontext debugging tools

This commit is contained in:
Emik 2026-04-09 20:04:27 +02:00
parent e74f4d44c9
commit 5d096d5f58
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
3 changed files with 7 additions and 2 deletions

3
.gitignore vendored
View file

@ -38,3 +38,6 @@ luac.out
*.i*86 *.i*86
*.x86_64 *.x86_64
*.hex *.hex
# Syncthing
.stfolder

View file

@ -6,7 +6,7 @@
"author": [ "author": [
"Emik" "Emik"
], ],
"version": "2.2.7", "version": "2.2.8",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"main_file": "src/main.lua", "main_file": "src/main.lua",
"badge_text_colour": "44475A", "badge_text_colour": "44475A",
@ -15,7 +15,7 @@
"provides": [], "provides": [],
"conflicts": [], "conflicts": [],
"dependencies": [ "dependencies": [
"Steamodded (>=1.*)", "Steamodded (>=1.0~*)",
"Lovely (>=0.6)", "Lovely (>=0.6)",
"Bakery (>=0.1.26~*)" "Bakery (>=0.1.26~*)"
] ]

View file

@ -337,6 +337,8 @@ function SMODS.current_mod:calculate(context)
modifiers.Roland_martingale_seed = (modifiers.Roland_martingale_seed or 0) + 1 modifiers.Roland_martingale_seed = (modifiers.Roland_martingale_seed or 0) + 1
end end
local _ = type(G.calccontext) == "function" and G.calccontext(context)
local _ = type(G.calckeys) == "function" and G.calckeys(f(context):keys())
local _ = type(G.calc) == "function" and G.calc(f(context):keys():string()) local _ = type(G.calc) == "function" and G.calc(f(context):keys():string())
local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities