Skip to content

Commit a13917d

Browse files
committed
fix code ui stuff
1 parent dee6648 commit a13917d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

items/pointer.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ local pointer = {
3636
card.ability.cry_multiuse = card.ability.cry_multiuse + 1
3737
end
3838
G.GAME.USING_CODE = true
39+
G.OVERLAY_MENU_POINTER = true
3940
G.E_MANAGER:add_event(Event({
4041
func = function()
4142
G.GAME.USING_POINTER = true
4243
G.FUNCS.overlay_menu({ definition = create_UIBox_your_collection() })
4344
return true
4445
end,
45-
}))
46+
}))
4647
G.GAME.POINTER_SUBMENU = nil
4748
end,
4849
init = function(self)
@@ -136,10 +137,6 @@ local pointer = {
136137
if ret then
137138
G.FUNCS.exit_overlay_menu_code()
138139
ccl(self)
139-
if G.GAME.CODE_DESTROY_CARD then
140-
G.GAME.CODE_DESTROY_CARD:start_dissolve()
141-
G.GAME.CODE_DESTROY_CARD = nil
142-
end
143140
else
144141
G.GAME.USING_CODE = true
145142
G.GAME.USING_POINTER = true
@@ -508,6 +505,7 @@ local pointer = {
508505
G.GAME.USING_CODE = false
509506
G.GAME.USING_POINTER = false
510507
G.DEBUG_POINTER = false
508+
return true
511509
end
512510
end
513511
if not current_card then -- if card isn't created yet, try playing cards
@@ -759,6 +757,7 @@ local pointer = {
759757
end,
760758
}))
761759
draw_card(G.play, G.deck, 90, "up", nil)
760+
return true
762761
end
763762
end
764763
end

lib/misc.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,9 @@ G.FUNCS.exit_overlay_menu_code = function(e)
11651165
and G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse
11661166
then
11671167
G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse = G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse - 1
1168+
elseif G.GAME.CODE_DESTROY_CARD then
1169+
G.GAME.CODE_DESTROY_CARD:start_dissolve()
1170+
G.GAME.CODE_DESTROY_CARD = nil
11681171
end
11691172
G.GAME.CODE_DESTROY_CARD = nil
11701173
end

lib/overrides.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,14 @@ function Game:update(dt)
408408
v.children.back:set_sprite_pos(G.P_CENTERS.b_cry_glowing.pos or G.P_CENTERS["b_red"].pos)
409409
end
410410
end
411-
if not G.OVERLAY_MENU and G.GAME.CODE_DESTROY_CARD then
411+
if not G.OVERLAY_MENU and G.GAME.CODE_DESTROY_CARD and not G.OVERLAY_MENU_POINTER then
412412
G.FUNCS.exit_overlay_menu_code()
413413
end
414414

415415
if not G.OVERLAY_MENU then
416416
G.GAME.USING_POINTER = nil
417+
else
418+
G.OVERLAY_MENU_POINTER = nil
417419
end
418420

419421
--Increase the blind size for The Clock and Lavender Loop

0 commit comments

Comments
 (0)