Skip to content

Commit f07ed5d

Browse files
Actually implement custom main menu changes
1 parent 37f1d57 commit f07ed5d

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

lovely/lib_misc.toml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,35 @@ target = "game.lua"
1111
pattern = "SC = Card(G.ROOM.T.w/2 - SC_scale*G.CARD_W/2, 10. + G.ROOM.T.h/2 - SC_scale*G.CARD_H/2, SC_scale*G.CARD_W, SC_scale*G.CARD_H, G.P_CARDS.empty, G.P_CENTERS['j_joker'])"
1212
position = "after"
1313
payload = '''
14-
if true then --Cryptid.enabled["Menu"] then
15-
if false then --Cryptid.enabled["M Jokers"] then
16-
local mcard = {}
17-
for k, _ in pairs(Cryptid.M_jokers) do
18-
if G.P_CENTERS[k] then
19-
mcard[#mcard + 1] = k
20-
end
21-
end
22-
local option = math.random(#mcard)
23-
local chosenoption = mcard[option]
24-
if chosenoption == "j_cry_biggestm" or chosenoption == "j_cry_reverse" then --These don't render properly; replace these with loopy instead
25-
SC = Card(G.ROOM.T.w/2 - SC_scale*G.CARD_W/2, 10. + G.ROOM.T.h/2 - SC_scale*G.CARD_H/2, SC_scale*G.CARD_W, SC_scale*G.CARD_H, G.P_CARDS.empty, G.P_CENTERS['j_cry_loopy'],{bypass_discovery_center = true, bypass_discovery_ui = true})
26-
else
27-
SC = Card(G.ROOM.T.w/2 - SC_scale*G.CARD_W/2, 10. + G.ROOM.T.h/2 - SC_scale*G.CARD_H/2, SC_scale*G.CARD_W, SC_scale*G.CARD_H, G.P_CARDS.empty, G.P_CENTERS[chosenoption],{bypass_discovery_center = true, bypass_discovery_ui = true})
28-
end
29-
else
30-
SC = Card(G.ROOM.T.w/2 - SC_scale*G.CARD_W/2, 10. + G.ROOM.T.h/2 - SC_scale*G.CARD_H/2, SC_scale*G.CARD_W, SC_scale*G.CARD_H, G.P_CARDS.empty, G.P_CENTERS['j_jolly'],{bypass_discovery_center = true, bypass_discovery_ui = true})
31-
end
14+
if Cryptid_config.menu then
15+
SC = Card(G.ROOM.T.w/2 - SC_scale*G.CARD_W/2, 10. + G.ROOM.T.h/2 - SC_scale*G.CARD_H/2, SC_scale*G.CARD_W, SC_scale*G.CARD_H, G.P_CARDS.empty, G.P_CENTERS['j_jolly'],{bypass_discovery_center = true, bypass_discovery_ui = true})
3216
end
3317
'''
3418
match_indent = true
3519

3620
# Make cards in splash screen CCD cards
37-
# Requires "Custom Main Menu" config to be enabled
21+
# Disabling this because it caused fps drops on profiles with nothing discovered
3822
[[patches]]
3923
[patches.pattern]
4024
target = "game.lua"
4125
pattern = "if math.random() > 0.8 then card.sprite_facing = 'back'; card.facing = 'back' end"
4226
position = "before"
4327
payload = '''
44-
if Cryptid.random_consumable --[[Cryptid.enabled["Menu"]--]] then card:set_ability(Cryptid.random_consumable('cry_splash',{"no_grc"},nil,nil,true), true, nil) end
28+
--if Cryptid.random_consumable then card:set_ability(Cryptid.random_consumable('cry_splash',{"no_grc"},nil,nil,true), true, nil) end
4529
'''
4630
match_indent = true
4731

48-
# Show Glitched Edition to confirm Cryptid is Active
32+
# Show Glitched Edition to confirm Cryptid is Active if custom main menu is enabled
4933
[[patches]]
5034
[patches.pattern]
5135
target = "game.lua"
5236
pattern = "replace_card.states.visible = false"
5337
position = "before"
54-
payload = "replace_card:set_edition(G.P_CENTERS.e_cry_glitched and 'e_cry_glitched' or 'e_negative',true,true)"
38+
payload = '''
39+
if Cryptid_config.menu then
40+
replace_card:set_edition(G.P_CENTERS.e_cry_glitched and 'e_cry_glitched' or 'e_negative',true,true)
41+
end
42+
'''
5543
match_indent = true
5644

5745
# Patch related crash
@@ -268,4 +256,4 @@ target = '''=[SMODS _ "src/game_object.lua"]'''
268256
pattern = "self.full_path = (self.mod and self.mod.path or SMODS.path) .."
269257
position = "at"
270258
payload = "self.full_path = (self.mod_path or self.mod and self.mod.path or SMODS.path) .."
271-
match_indent = true
259+
match_indent = true

0 commit comments

Comments
 (0)