Prevent crash from Cryptid's edition deck on Jumbo

This commit is contained in:
Emik 2025-04-11 17:23:32 +02:00
parent bb5908b042
commit 81695eae8b
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
2 changed files with 12 additions and 4 deletions

View file

@ -17,5 +17,5 @@
"conflicts": [ "conflicts": [
"Jen" "Jen"
], ],
"version": "1.1.4" "version": "1.1.5"
} }

View file

@ -1,8 +1,8 @@
SMODS.Shader({key = "polygloss", path = "polygloss.fs"})
SMODS.Shader({key = "moire", path = "moire.fs"}) SMODS.Shader({key = "moire", path = "moire.fs"})
SMODS.Shader({key = "polygloss", path = "polygloss.fs"})
SMODS.Sound({key = "e_jumbo", path = "e_jumbo.ogg"}) SMODS.Sound({key = "e_jumbo", path = "e_jumbo.ogg"})
SMODS.Sound({key = "e_polygloss", path = "e_polygloss.ogg"})
SMODS.Sound({key = "e_moire", path = "e_moire.ogg"}) SMODS.Sound({key = "e_moire", path = "e_moire.ogg"})
SMODS.Sound({key = "e_polygloss", path = "e_polygloss.ogg"})
local function get_weight(self) local function get_weight(self)
return G.GAME.edition_rate * self.weight return G.GAME.edition_rate * self.weight
@ -90,6 +90,14 @@ SMODS.Edition({
get_weight = get_weight, get_weight = get_weight,
}) })
local orig_draw_shader = Sprite.draw_shader
function Sprite:draw_shader(_shader, ...)
if _shader ~= "jane_jumbo" then
return orig_draw_shader(self, _shader, ...)
end
end
local jumbo_modifier = Cryptid and 100 or 2 local jumbo_modifier = Cryptid and 100 or 2
SMODS.Edition({ SMODS.Edition({
@ -154,9 +162,9 @@ SMODS.Edition({
end, end,
sound = {sound = "jane_e_jumbo", per = 1, vol = 0.5}, sound = {sound = "jane_e_jumbo", per = 1, vol = 0.5},
weight = 3, weight = 3,
extra_cost = 5,
in_shop = true, in_shop = true,
shader = false, shader = false,
extra_cost = 5,
apply_to_float = false, apply_to_float = false,
get_weight = get_weight, get_weight = get_weight,
}) })