Replace show screen with call screen

(cherry picked from commit 1672b2381a)
This commit is contained in:
Gouvernathor 2023-11-17 03:13:17 +01:00 committed by LoafyLemon
parent f2d2c045af
commit 9665d565d8

View File

@ -28,27 +28,21 @@ label summon_menu(xx=723, yy=90):
$ current_sorting = summon_show_busy $ current_sorting = summon_show_busy
label .after_init: call screen summon(xx, yy)
show screen summon(xx, yy)
$ renpy.dynamic(__choice = ui.interact())
if __choice[0] == "summon":
hide screen summon
if not __choice[2]:
$ enable_game_menu()
$ renpy.jump_out_of_context("summon_"+__choice[1].lower())
else:
if game.daytime or __choice[1] in ["Tonks", "Snape"]:
nar "[__choice[1]] is currently busy. Try again later."
else:
nar "[__choice[1]] is currently asleep. Try again tomorrow."
else:
hide screen summon
return return
jump .after_init label .summon(char, busy):
if not busy:
$ enable_game_menu()
$ renpy.jump_out_of_context("summon_"+char.lower())
else:
if game.daytime or char in ["Tonks", "Snape"]:
nar "[char] is currently busy. Try again later."
else:
nar "[char] is currently asleep. Try again tomorrow."
return
screen summon(xx, yy): screen summon(xx, yy):
tag summon tag summon
@ -115,10 +109,10 @@ screen summon_menu():
text_xanchor 0.5 text_xanchor 0.5
text_size 20 text_size 20
if not summon_dict[char]["busy"]: if not summon_dict[char]["busy"]:
action Return(["summon", char, False]) action Call("summon_menu.summon", char, False)
else: else:
text_color "#8C8C70" text_color "#8C8C70"
action Return(["summon", char, True]) action Call("summon_menu.summon", char, True)
add gui.format("interface/achievements/{}/spacer_left.webp") add gui.format("interface/achievements/{}/spacer_left.webp")