From 86b55b55420bdf8b28b93622cdf95be611ea02d7 Mon Sep 17 00:00:00 2001 From: Emik Date: Fri, 31 Jul 2026 04:26:13 +0200 Subject: [PATCH] Add non-talisman compatibility --- lovely.toml | 14 +++++++++----- manifest.json | 2 +- src/misprintize.lua | 2 ++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lovely.toml b/lovely.toml index 59b1545..2592430 100644 --- a/lovely.toml +++ b/lovely.toml @@ -47,16 +47,20 @@ payload = '''if Jane and G.ARGS.score_intensity.required_score:to_number() or G.ARGS.score_intensity.required_score) ~= 0 then local break_infinity = ((Talisman or {}).config_file or {}).break_infinity + local small = function (x) return type(x) == "table" and x:to_number() or x end local big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big local base = Cryptid and 2 or G.ARGS.score_intensity.required_score local expo = Cryptid and G.ARGS.score_intensity.required_score or 2 - local ratio = (G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))):to_number() - Jane.sinister = ratio > 1 + local ratio = G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo)) + Jane.sinister = small(ratio) > 1 G.ARGS.score_intensity.ambientSurreal4 = (break_infinity and SMODS.Mods.Amulet and - G.ARGS.score_intensity.earned_score >= Bakery_API.parse_hyper_e("e10#10##10000")) and 1 or 0 + G.ARGS.score_intensity.earned_score >= (SMODS.Mods.Amulet + and Big:new { 1.7976931348623157e308, 1, [1.7975e308] = 1 } + or Bakery_API.parse_hyper_e 'e10#10##100000' + )) and 1 or 0 G.ARGS.score_intensity.ambientSurreal3 = (G.ARGS.score_intensity.ambientSurreal4 == 0 and @@ -65,14 +69,14 @@ payload = '''if Jane and G.ARGS.score_intensity.ambientSurreal2 = (G.ARGS.score_intensity.ambientSurreal3 == 0 and G.ARGS.score_intensity.ambientSurreal4 == 0 and - (G.ARGS.score_intensity.earned_score / + small(G.ARGS.score_intensity.earned_score / (Cryptid and big(G.ARGS.score_intensity.required_score) ^ big(G.ARGS.score_intensity.required_score) ^ big(G.ARGS.score_intensity.required_score) or big(2) ^ big(G.ARGS.score_intensity.required_score) ) - ):to_number() > 1 + ) > 1 ) and 1 or 0 G.ARGS.score_intensity.ambientSurreal1 = diff --git a/manifest.json b/manifest.json index 095e675..0047ac7 100644 --- a/manifest.json +++ b/manifest.json @@ -18,5 +18,5 @@ "conflicts": [ "Jen" ], - "version": "1.11.17" + "version": "1.11.18" } \ No newline at end of file diff --git a/src/misprintize.lua b/src/misprintize.lua index 267e4b3..d1abd07 100644 --- a/src/misprintize.lua +++ b/src/misprintize.lua @@ -127,6 +127,8 @@ function Jane.misprintize_val(val, override, big) end function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big) + local is_number = _G.is_number or function(x) return type(x) == "number" end + if name and ref_tbl and ref_value then local tbl = deep_copy(ref_tbl[ref_value])