Skip to content

Commit 1139ee3

Browse files
committed
fix unlocks
1 parent 25406c8 commit 1139ee3

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

Cryptid.lua

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ local function process_items(f, mod)
9292
modest = {disabled = true},
9393
}
9494
end--]]
95-
if G.PROFILES[G.SETTINGS.profile].all_unlocked then
96-
-- There's something a bit goofy about this, it shouldn't kick in this early
97-
item.alerted = true
98-
item.discovered = true
99-
item.unlocked = true
100-
end
10195
if not Cryptid.object_registry[item.object_type] then
10296
Cryptid.object_registry[item.object_type] = {}
10397
end
@@ -191,6 +185,20 @@ local inj = SMODS.injectItems
191185
function SMODS.injectItems(...)
192186
inj(...)
193187
cry_update_obj_registry()
188+
for _, t in ipairs{
189+
G.P_CENTERS,
190+
G.P_BLINDS,
191+
G.P_TAGS,
192+
G.P_SEALS,
193+
} do
194+
for k, v in pairs(t) do
195+
if v and G.PROFILES[G.SETTINGS.profile].all_unlocked then
196+
v.alerted = true
197+
v.discovered = true
198+
v.unlocked = true
199+
end
200+
end
201+
end
194202
end
195203

196204
local cryptidConfigTab = function()

lib/misc.lua

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ if true then --Cryptid.enabled["Menu"] then
353353
Game.main_menu = function(change_context)
354354
local ret = oldfunc(change_context)
355355
-- adds a Cryptid spectral to the main menu
356-
local newcard = create_card("Spectral", G.title_top, nil, nil, nil, nil, "c_cryptid", "elial1")
356+
local newcard = Card(G.title_top.T.x, G.title_top.T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, G.P_CENTERS.c_cryptid, {bypass_discovery_center = true})
357357
-- recenter the title
358358
G.title_top.T.w = G.title_top.T.w * 1.7675
359359
G.title_top.T.x = G.title_top.T.x - 0.8
@@ -362,6 +362,7 @@ if true then --Cryptid.enabled["Menu"] then
362362
newcard.T.w = newcard.T.w * 1.1 * 1.2
363363
newcard.T.h = newcard.T.h * 1.1 * 1.2
364364
newcard.no_ui = true
365+
newcard.states.visible = false
365366

366367
-- make the title screen use different background colors
367368
G.SPLASH_BACK:define_draw_steps({
@@ -375,6 +376,23 @@ if true then --Cryptid.enabled["Menu"] then
375376
},
376377
},
377378
})
379+
380+
G.E_MANAGER:add_event(Event({
381+
trigger = 'after',
382+
delay = 0,
383+
blockable = false,
384+
blocking = false,
385+
func = (function()
386+
if change_context == 'splash' then
387+
newcard.states.visible = true
388+
newcard:start_materialize({G.C.WHITE,G.C.WHITE}, true, 2.5)
389+
else
390+
newcard.states.visible = true
391+
newcard:start_materialize({G.C.WHITE,G.C.WHITE}, nil, 1.2)
392+
end
393+
return true
394+
end)}))
395+
378396
return ret
379397
end
380398
end

0 commit comments

Comments
 (0)