Add non-talisman compatibility
This commit is contained in:
parent
4480833d67
commit
86b55b5542
3 changed files with 12 additions and 6 deletions
14
lovely.toml
14
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:to_number() or
|
||||||
G.ARGS.score_intensity.required_score) ~= 0 then
|
G.ARGS.score_intensity.required_score) ~= 0 then
|
||||||
local break_infinity = ((Talisman or {}).config_file or {}).break_infinity
|
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 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 base = Cryptid and 2 or G.ARGS.score_intensity.required_score
|
||||||
local expo = Cryptid and G.ARGS.score_intensity.required_score or 2
|
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()
|
local ratio = G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))
|
||||||
Jane.sinister = ratio > 1
|
Jane.sinister = small(ratio) > 1
|
||||||
|
|
||||||
G.ARGS.score_intensity.ambientSurreal4 =
|
G.ARGS.score_intensity.ambientSurreal4 =
|
||||||
(break_infinity and
|
(break_infinity and
|
||||||
SMODS.Mods.Amulet 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.ambientSurreal3 =
|
||||||
(G.ARGS.score_intensity.ambientSurreal4 == 0 and
|
(G.ARGS.score_intensity.ambientSurreal4 == 0 and
|
||||||
|
|
@ -65,14 +69,14 @@ payload = '''if Jane and
|
||||||
G.ARGS.score_intensity.ambientSurreal2 =
|
G.ARGS.score_intensity.ambientSurreal2 =
|
||||||
(G.ARGS.score_intensity.ambientSurreal3 == 0 and
|
(G.ARGS.score_intensity.ambientSurreal3 == 0 and
|
||||||
G.ARGS.score_intensity.ambientSurreal4 == 0 and
|
G.ARGS.score_intensity.ambientSurreal4 == 0 and
|
||||||
(G.ARGS.score_intensity.earned_score /
|
small(G.ARGS.score_intensity.earned_score /
|
||||||
(Cryptid and
|
(Cryptid and
|
||||||
big(G.ARGS.score_intensity.required_score) ^
|
big(G.ARGS.score_intensity.required_score) ^
|
||||||
big(G.ARGS.score_intensity.required_score) ^
|
big(G.ARGS.score_intensity.required_score) ^
|
||||||
big(G.ARGS.score_intensity.required_score) or
|
big(G.ARGS.score_intensity.required_score) or
|
||||||
big(2) ^ big(G.ARGS.score_intensity.required_score)
|
big(2) ^ big(G.ARGS.score_intensity.required_score)
|
||||||
)
|
)
|
||||||
):to_number() > 1
|
) > 1
|
||||||
) and 1 or 0
|
) and 1 or 0
|
||||||
|
|
||||||
G.ARGS.score_intensity.ambientSurreal1 =
|
G.ARGS.score_intensity.ambientSurreal1 =
|
||||||
|
|
|
||||||
|
|
@ -18,5 +18,5 @@
|
||||||
"conflicts": [
|
"conflicts": [
|
||||||
"Jen"
|
"Jen"
|
||||||
],
|
],
|
||||||
"version": "1.11.17"
|
"version": "1.11.18"
|
||||||
}
|
}
|
||||||
|
|
@ -127,6 +127,8 @@ function Jane.misprintize_val(val, override, big)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big)
|
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
|
if name and ref_tbl and ref_value then
|
||||||
local tbl = deep_copy(ref_tbl[ref_value])
|
local tbl = deep_copy(ref_tbl[ref_value])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue