WTS/game/scripts/interface/gifts.rpy
LoafyLemon a06df58240 Bug fixes, Engine, Hotkeys
* Implement JumpWith action
* Fix hide windows hotkey
* Fix surface tree capture by implementing inter pauses for interface elements
* Implement achievements 'O' hotkey
* Fixed call stack depth issues
2024-09-24 21:16:55 +01:00

120 lines
4.9 KiB
Plaintext

label gift_menu(inter_pause=True):
$ disable_game_menu()
$ inventory_mode = 1
if inter_pause:
# Ensures all irrelevant screens are hidden before capturing the surface tree
with Pause(0.2)
call screen inventory
if not _return == True:
if _return.type == "gift":
if get_character_gifted(states.active_girl):
show screen blktone
with d3
gen "I already gave her a gift today. Don't want to spoil her too much..." ("base", xpos="far_left", ypos="head")
hide screen blktone
with d3
else:
$ renpy.call(get_character_gift_label(states.active_girl), _return)
elif _return.type == "potion":
if not states.active_girl in _return.usable_on:
show screen blktone
with d3
gen "(Something tells me this potion won't work on [states.active_girl].)" ("base", xpos="far_left", ypos="head")
nar "Perhaps in the future..."
hide screen blktone
with d3
elif not states.env.daytime:
show screen blktone
with d3
gen "(Some grander force tells me I should give it to her during daytime only.)" ("base", xpos="far_left", ypos="head")
hide screen blktone
with d3
elif get_character_mood(states.active_girl) > 0:
show screen blktone
with d3
gen "(I don't think it's a good idea to give it to her when she's still upset with me...)" ("base", xpos="far_left", ypos="head")
gen "(I should wait for her to calm down first.)" ("base", xpos="far_left", ypos="head")
hide screen blktone
with d3
elif states.active_girl == "hermione" and not states.her.favors_convinced_stage == 2 and is_in_lead(states.env.gryffindor):
show screen blktone
with d3
gen "[name_hermione_genie], what would you say--" ("base", xpos="far_left", ypos="head")
her "I'm sorry professor but I don't need your help at the moment."
her "My house is already in the lead points wise."
gen "Figures..." ("base", xpos="far_left", ypos="head")
call tutorial("points")
hide screen blktone
with d3
else:
python:
enable_game_menu()
inventory_mode = 0
_return.give()
elif _return.type == "quest":
if not states.active_girl in _return.usable_on:
show screen blktone
with d3
gen "(Something tells me I cannot give this item to [states.active_girl].)" ("base", xpos="far_left", ypos="head")
nar "Perhaps in the future..."
hide screen blktone
with d3
#TODO Add daytime check for buttplug give item event
#show screen blktone
#with d3
#gen "(Some grander force tells me I should give it to her during daytime only.)" ("base", xpos="far_left", ypos="head")
#hide screen blktone
#with d3
elif get_character_mood(states.active_girl) > 0:
show screen blktone
with d3
gen "(I don't think it's a good idea to give it to her when she's still upset with me...)" ("base", xpos="far_left", ypos="head")
gen "(I should wait for her to calm down first.)" ("base", xpos="far_left", ypos="head")
hide screen blktone
with d3
elif states.active_girl == "hermione" and not states.her.favors_convinced_stage == 2 and is_in_lead(states.env.gryffindor):
show screen blktone
with d3
gen "[name_hermione_genie], I have something for you--" ("base", xpos="far_left", ypos="head")
her "I'm sorry professor but I don't need your help at the moment."
her "My house is already in the lead points wise."
gen "Figures..." ("base", xpos="far_left", ypos="head")
call tutorial("points")
hide screen blktone
with d3
else:
python:
enable_game_menu()
inventory_mode = 0
_return.give(states.active_girl)
$ inventory_mode = 0
$ enable_game_menu()
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):
layer "interface"
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"