2022-05-16 23:48:22 +00:00
|
|
|
label enlarge_poster:
|
2022-12-17 21:52:44 +00:00
|
|
|
show image "#00000080" as underlay
|
|
|
|
$ renpy.show(name="poster", what=Image(poster_OBJ.decoration.image), zorder=25, at_list=[truecenter])
|
|
|
|
|
|
|
|
call ctc
|
|
|
|
|
|
|
|
hide poster
|
|
|
|
hide underlay
|
|
|
|
with d3
|
|
|
|
|
|
|
|
jump main_room_menu
|
|
|
|
|
|
|
|
# Xmas 2022 - Decoration
|
|
|
|
|
|
|
|
default naughty_list_commentary = False
|
|
|
|
|
|
|
|
label naughty_list:
|
|
|
|
|
|
|
|
python:
|
2022-12-20 22:54:47 +00:00
|
|
|
# This code retrieves user name and displays it on a leaderboard-like
|
|
|
|
# list for funsies, the variable is discarded afterwards.
|
2022-12-17 21:52:44 +00:00
|
|
|
_username = None
|
|
|
|
_d = [(i, get_character_progression(i)) for i in CHARACTERS if get_character_unlock(i)]
|
|
|
|
_d.append(["Snape", sna_friendship])
|
|
|
|
|
|
|
|
try:
|
2022-12-20 22:54:47 +00:00
|
|
|
_username = os.getenv("USERNAME")
|
|
|
|
|
|
|
|
if not _username:
|
|
|
|
_username = os.getlogin()
|
|
|
|
|
|
|
|
# Windows returns an empty string when it encounters an error,
|
|
|
|
# in ucrtbase.dll, and we need to catch that.
|
|
|
|
if not _username:
|
|
|
|
raise Exception("Cannot retrieve user name, using the fallback.")
|
|
|
|
|
|
|
|
_username = _username.split(" ")[0].capitalize()
|
2022-12-17 21:52:44 +00:00
|
|
|
_d.append([_username, 999])
|
2022-12-20 22:54:47 +00:00
|
|
|
|
2022-12-17 21:52:44 +00:00
|
|
|
except:
|
|
|
|
_d.append(["Genie", 999])
|
|
|
|
|
|
|
|
_d.sort(key=lambda x: x[1], reverse=True)
|
|
|
|
|
|
|
|
show screen naughty_list(_d)
|
2022-05-16 23:48:22 +00:00
|
|
|
with d3
|
|
|
|
|
2022-12-17 21:52:44 +00:00
|
|
|
if not naughty_list_commentary:
|
|
|
|
$ naughty_list_commentary = True
|
|
|
|
|
|
|
|
pause 1.0
|
|
|
|
|
2022-12-20 22:54:47 +00:00
|
|
|
if _username is None:
|
2022-12-17 21:52:44 +00:00
|
|
|
gen "I'm on the first place, nice!" ("base", xpos="far_left", ypos="head")
|
2022-12-20 22:54:47 +00:00
|
|
|
else:
|
|
|
|
gen "List checks out... But who the fuck is [_username]?" ("base", xpos="far_left", ypos="head")
|
2022-12-17 21:52:44 +00:00
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
call ctc
|
|
|
|
|
2022-12-17 21:52:44 +00:00
|
|
|
hide screen naughty_list
|
2022-05-16 23:48:22 +00:00
|
|
|
with d3
|
|
|
|
|
2022-12-20 22:54:47 +00:00
|
|
|
python:
|
|
|
|
del _username
|
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
jump main_room_menu
|
|
|
|
|
2022-12-17 21:52:44 +00:00
|
|
|
screen naughty_list(d):
|
2022-05-16 23:48:22 +00:00
|
|
|
zorder 25
|
|
|
|
|
2022-12-17 21:52:44 +00:00
|
|
|
add "#00000080"
|
|
|
|
add "naughty_list scroll" fit "cover" at truecenter
|
|
|
|
|
|
|
|
vbox:
|
|
|
|
align (0.51, 0.66)
|
|
|
|
spacing 2
|
|
|
|
|
|
|
|
for i, (name, _) in enumerate(d, start=1):
|
|
|
|
|
|
|
|
fixed:
|
|
|
|
fit_first True
|
|
|
|
add "naughty_list spacer" size (156, 21)
|
|
|
|
text "[i]" pos (6, 3)
|
|
|
|
text "[name]" xalign 0.5 yoffset 3
|