WTS/game/scripts/interface/gifts.rpy
Gouvernathor 3579e2a38b Add safe return
otherwise the implicit return is at the end of the file, which means if we add another label down the file, it will be executed after give_gift

(cherry picked from commit 38787bdc4c)
2024-03-24 17:27:12 +00:00

23 lines
485 B
Plaintext

label gift_menu:
$ inventory_mode = 1
$ gui.in_context("inventory_menu")
$ inventory_mode = 0
return
label give_gift(text, gift):
show screen gift(gift)
with d3
"[text]"
hide screen gift
with d3
$ gift.owned -= 1
return
screen gift(gift):
zorder 30
if isinstance(gift, Item):
add gift.get_image() align (0.5, 0.4) xysize (320, 320) fit "contain"
else:
add gift align (0.5, 0.4) xysize (320, 320) fit "contain"