WTS/game/scripts/rooms/main_room/init.rpy
LoafyLemon 1cccaaeb8d Bug fixes
* Fixed Cho nickname scope
* Another attempt at fixing chibi positions and scale
2024-05-15 19:29:46 +01:00

140 lines
6.4 KiB
Plaintext

default main_room = Room("main_room", "main_room_menu")
default fireplace_OBJ = RoomObject(main_room, "fireplace", pos=(1386, 554), idle="fireplace_idle_shadow", focus_mask="fireplace_hover", foreground=None, action=Jump("fireplace"), tooltip="Light/Extinguish")
default cupboard_OBJ = RoomObject(
main_room,
"cupboard",
pos=(520, 560),
idle="cupboard_idle",
action={
"Open Inventory": (Text("🎒", align=(0.5, 0.5)), Jump("inventory"), "True"),
"Rummage": (Text("🖐️", align=(0.5, 0.5)), Jump("cupboard"), "True"),
"Calendar": (Text("📆", align=(0.5, 0.5)), Jump("calendar"), "True"),
},
tooltip="Cupboard"
)
default phoenix_OBJ = RoomObject(
main_room, "phoenix",
pos=(1114, 544),
idle="phoenix_idle",
hover="phoenix_hover",
focus_mask="phoenix_idle",
background="phoenix_feather",
action={
"Feed": (Text("🍔", align=(0.5, 0.5)), Jump("phoenix_feed"), "True"),
"Pet": (Text("🖐️", align=(0.5, 0.5)), Jump("phoenix_pet"), "True")
},
tooltip="Phoenix"
)
default door_OBJ = RoomObject(
main_room,
"door",
pos=(1796, 630),
idle="door_idle",
focus_mask="door_hover",
action={
"Summon Snape": (Transform("wheelmenu_snape", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.sna.busy", None, Jump("summon_snape")), "states.sna.unlocked"),
"Summon Tonks": (Transform("wheelmenu_tonks", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.ton.busy", None, Jump("summon_tonks")), "states.ton.unlocked"),
"Summon Hermione": (Transform("wheelmenu_hermione", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.her.busy", None, Jump("summon_hermione")), "states.her.unlocked"),
"Summon Cho": (Transform("wheelmenu_cho", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.cho.busy", None, Jump("summon_cho")), "states.cho.unlocked"),
"Summon Luna": (Transform("wheelmenu_luna", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.lun.busy", None, Jump("summon_luna")), "states.lun.unlocked"),
"Summon Astoria": (Transform("wheelmenu_astoria", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.ast.busy", None, Jump("summon_astoria")), "states.ast.unlocked"),
"Summon Susan": (Transform("wheelmenu_susan", align=(0.5, 0.5), xysize=(32, 32)), IfExpr("states.sus.busy", None, Jump("summon_susan")), "states.sus.unlocked"),
"Exit": (Text("🚪", align=(0.5, 0.5)), IfExpr("states.map.unlocked", Jump("map"), Jump("door")), "True"),
},
tooltip="Door"
)
default candleL_OBJ = RoomObject(main_room, "candle_left", pos=(700, 320), idle="candle_left", foreground=None, action=ToggleVariable("candleL_OBJ.foreground", "candle_fire", None), zorder=3)
default candleR_OBJ = RoomObject(main_room, "candle_right", pos=(1666, 450), idle="candle_right", foreground=None, action=ToggleVariable("candleR_OBJ.foreground", "candle_fire", None), zorder=3)
default desk_OBJ = RoomObject(
main_room,
"desk",
pos=(740, 672),
idle="ch_gen sit_behind_desk",
hover="ch_gen sit_behind_desk_hover",
focus_mask="ch_gen sit_behind_desk",
action={
"Sleep": (Text("💤", align=(0.5, 0.5)), IfExpr("states.env.daytime", Jump("night_start"), Jump("day_start")), "True"),
"Jerk Off": (Text("🍆", align=(0.5, 0.5)), Jump("jerk_off"), "True"),
"Do Paperwork": (Text("📝", align=(0.5, 0.5)), Jump("paperwork"), "states.paperwork_unlocked"),
"Open Deck Builder": (Text("🃏", align=(0.5, 0.5)), Jump("deck_builder"), "states.cardgame.unlocked"),
"Open Cheats Menu": (Text("🕹️", align=(0.5, 0.5)), Jump("cheats"), "states.env.cheats"),
},
hovered=Show(
"gui_tooltip",
img="emo_exclaim",
xx=670,
yy=420
),
unhovered=Hide("gui_tooltip"),
tooltip="Desk",
zorder=1
)
default poster_OBJ = RoomObject(main_room, "poster", pos=(728, 570), idle=Null(127, 166), action=Jump("enlarge_poster"), zorder=-1)
default trophy_OBJ = RoomObject(main_room, "trophy", pos=(1300, 240), idle=Null(), action=None, zorder=-1)
default chair_OBJ = RoomObject(main_room, "chair", pos=(1586, 600), idle="chair_right", action=None, zorder=0)
default chair_left_OBJ = RoomObject(main_room, "chair", pos=(666, 600), idle="chair_left", action=None, zorder=0, hidden=True)
default owl_OBJ = RoomObject(main_room, "owl", pos=(910, 578), idle="owl_letter", hover="owl_letter_hover", action=Jump("letter_open_all"), tooltip=_("Check Mail"), hidden=True, anchor=(0.5, 1.0))
default parcel_OBJ = RoomObject(main_room, "parcel", pos=(804, 580), idle="parcel", action=Jump("parcel_open_all"), tooltip=_("Check Parcel"), hidden=True, anchor=(0.5, 1.0))
default rug_OBJ = RoomObject(main_room, "rug", pos=(964, 784), idle=Null(), action=None, zorder=0)
default chandelier_OBJ = RoomObject(main_room, "chandelier", pos=(1072, 48), idle=Null(), action=None, zorder=5)
default window_OBJ = RoomObject(main_room, "window", pos=(918, 384), idle=Null(), action=None, zorder=0)
default safe_OBJ = RoomObject(main_room, "safe", pos=(146, 648), idle=Text("Safe", color="#fff"), action=Jump("inventory"), zorder=0)
screen main_room():
tag room
zorder 0
sensitive room_menu_active
default objects = sorted(main_room.objects, key=lambda x: x.zorder)
# Hotkeys
if room_menu_active and states.env.day > 1 and not renpy.android:
use hotkeys_main
add "weather [states.env.weather]" xycenter (860, 436) zoom 2.0
# Walls
if states.env.daytime:
add "main_room_idle_day"
else:
add "main_room_idle_night"
for obj in objects:
imagebutton:
anchor obj.get_anchor()
pos obj.get_pos()
idle obj.get_idle()
hover obj.get_hover()
foreground obj.get_foreground()
background obj.background
focus_mask obj.focus_mask
tooltip obj.tooltip
hovered obj.hovered
unhovered obj.unhovered
action obj.get_action()
label main_room:
call room("main_room", stop_sound=False)
call gen_walk(action="enter", xpos="desk", ypos="base", speed=1.5)
call gen_chibi("sit_behind_desk")
with d3
if states.env.daytime:
jump day_resume
else:
jump night_resume
# Return to main_room at menu point (after quests and events)
# Used to return from main room interactions
label main_room_menu:
hide screen bld1
with d3
if states.env.daytime:
jump day_resume
else:
jump night_resume