2022-05-16 23:48:22 +00:00
|
|
|
# Set the scene for a given room
|
|
|
|
label room(room=None, hide_screens=True, stop_sound=True):
|
|
|
|
|
|
|
|
# Hide all screens (only room related screens are shown)
|
|
|
|
if hide_screens:
|
2023-03-11 22:01:39 +00:00
|
|
|
$ renpy.scene("screens")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
# Stop sound effects (necessary when changing rooms)
|
|
|
|
if stop_sound:
|
2023-03-11 22:01:39 +00:00
|
|
|
stop background fadeout 0.5
|
|
|
|
stop weather fadeout 0.5
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-03-31 22:41:48 +00:00
|
|
|
$ renpy.stop_predict_screen(states.room)
|
2024-03-26 19:31:41 +00:00
|
|
|
$ renpy.stop_predict(f"images/rooms/{states.room}/*.webp")
|
2023-03-31 22:41:48 +00:00
|
|
|
$ states.room = room
|
|
|
|
$ renpy.start_predict_screen(states.room)
|
2024-03-26 19:31:41 +00:00
|
|
|
$ renpy.start_predict(f"images/rooms/{states.room}/*.webp")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
if room == "main_room":
|
|
|
|
# Update sound effects
|
|
|
|
call weather_sound
|
|
|
|
|
|
|
|
show screen main_room
|
|
|
|
|
2023-03-31 22:41:48 +00:00
|
|
|
if mailbox.get_letters():
|
2022-05-16 23:48:22 +00:00
|
|
|
$ owl_OBJ.hidden = False
|
2023-03-11 22:01:39 +00:00
|
|
|
play sound "sounds/owl.ogg"
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
if mailbox.get_parcels():
|
|
|
|
$ parcel_OBJ.hidden = False
|
|
|
|
|
|
|
|
elif room == "weasley_store":
|
|
|
|
show screen weasley_store_room
|
|
|
|
|
|
|
|
elif room == "clothing_store":
|
|
|
|
show screen clothing_store
|
|
|
|
|
|
|
|
elif room == "seventh_floor":
|
|
|
|
show screen seventh_floor
|
|
|
|
|
|
|
|
elif room == "room_of_requirement":
|
|
|
|
show screen room_of_requirement
|
|
|
|
show screen room_of_requirement_overlay
|
|
|
|
|
|
|
|
elif room == "quidditch_pitch":
|
|
|
|
show screen quid_pitch_back
|
|
|
|
show screen quid_pitch_mid
|
|
|
|
show screen quid_pitch_front
|
|
|
|
|
|
|
|
elif room == "quidditch_stands":
|
|
|
|
call quidditch_stands(reset=True)
|
|
|
|
|
|
|
|
elif room == "quidditch_stands2":
|
|
|
|
call quidditch_stands2(reset=True)
|
|
|
|
|
|
|
|
elif room == "snape_office":
|
|
|
|
show screen snape_office
|
|
|
|
|
|
|
|
elif room == "boxing_ring":
|
|
|
|
show screen boxing_ring
|
|
|
|
show screen boxing_ring_overlay
|
|
|
|
|
|
|
|
return
|