2024-10-13 08:38:11 +00:00
|
|
|
# Defines
|
|
|
|
define wardrobe.outfit_schedule = ("day", "night", "cloudy", "rainy", "snowy")
|
|
|
|
define wardrobe.subcategories = {
|
2022-05-16 23:48:22 +00:00
|
|
|
"hair": 5, "shirts": 5, "skirts": 5, "pantyhose": 5, "slot1": 5, "panties": 5, "save": 5,
|
|
|
|
"earrings": 4, "sweaters": 4, "trousers": 4, "stockings": 4, "bikini panties": 4, "load": 4,
|
|
|
|
"neckwear": 3, "dresses": 3, "shorts": 3, "socks": 3, "schedule": 3,
|
|
|
|
"one-piece suits": 2, "import": 2,
|
|
|
|
"robes": 1, "export": 1,
|
|
|
|
"gloves": 0, "pubes": 0, "delete": 0,
|
|
|
|
"other": -1,
|
|
|
|
}
|
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
# Settings
|
|
|
|
default wardrobe.music = False
|
|
|
|
default wardrobe.chitchats = True
|
|
|
|
default wardrobe.autosave = False
|
|
|
|
default wardrobe.suppress_warnings = False
|
|
|
|
default wardrobe.randomize_color = False
|
|
|
|
default wardrobe.global_color = False
|
2023-07-11 21:57:49 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
# Functions
|
|
|
|
init python in wardrobe:
|
|
|
|
from collections import OrderedDict
|
2023-07-11 21:57:49 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
def get_subcategories(d):
|
|
|
|
return OrderedDict(
|
2023-07-13 23:59:26 +00:00
|
|
|
sorted(
|
|
|
|
[
|
|
|
|
(subcat, [item for item in items if item.unlocked])
|
2024-10-13 08:38:11 +00:00
|
|
|
for subcat, items in subcategories.get(d, {}).items()
|
2023-07-13 23:59:26 +00:00
|
|
|
],
|
2024-10-13 08:38:11 +00:00
|
|
|
key=lambda x: subcategories.get(x[0], 0),
|
2023-07-13 23:59:26 +00:00
|
|
|
reverse=True
|
|
|
|
)
|
|
|
|
)
|
2023-02-10 23:12:16 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
def get_icon(category):
|
|
|
|
fp = f"gui/creamy_pumpkin_pie/icons/{category}.png"
|
|
|
|
if renpy.loadable(fp):
|
|
|
|
return renpy.store.Image(fp, oversample=4)
|
|
|
|
return renpy.store.Image("gui/creamy_pumpkin_pie/icons/noicon.png", oversample=4)
|
|
|
|
|
|
|
|
label wardrobe(inter_pause=True):
|
|
|
|
$ disable_game_menu()
|
|
|
|
if inter_pause:
|
|
|
|
# Ensures all irrelevant screens are hidden before capturing the surface tree
|
|
|
|
with Pause(0.2)
|
|
|
|
call screen wardrobe
|
|
|
|
$ enable_game_menu()
|
|
|
|
jump main_room_menu
|
|
|
|
|
|
|
|
screen wardrobe():
|
|
|
|
modal True
|
|
|
|
layer "interface"
|
|
|
|
zorder 0
|
2022-05-16 23:48:22 +00:00
|
|
|
style_prefix "wardrobe"
|
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
default navigation_atl = navigation_show
|
|
|
|
default last_frame = (screenshot.capture() or screenshot.image)
|
|
|
|
default navigation_last_frame_atl = navigation_last_frame_show
|
|
|
|
default navigation_exit = False
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
default character = get_character_object(states.active_girl)
|
|
|
|
default selected_category = None
|
|
|
|
default selected_subcategory = None
|
|
|
|
# default menu_items = inventory.get_instances_of_type(category)
|
|
|
|
# default selected_item = None
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
add last_frame at navigation_last_frame_atl
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
add "gui_fade_both" at gui_fade
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
if navigation_exit:
|
|
|
|
timer 0.4 action Return()
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
frame:
|
|
|
|
at navigation_atl
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
vbox:
|
2022-05-16 23:48:22 +00:00
|
|
|
hbox:
|
|
|
|
spacing 0
|
2024-10-13 08:38:11 +00:00
|
|
|
for category in character.wardrobe:
|
|
|
|
if category == "hidden":
|
|
|
|
continue
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
button:
|
|
|
|
add wardrobe.get_icon(category) xysize (64, 64)
|
|
|
|
tooltip "[category]"
|
|
|
|
action [SetScreenVariable("selected_category", category), SetScreenVariable("selected_subcategory", None)]
|
|
|
|
|
|
|
|
null height 5
|
|
|
|
add "frame_spacer" xsize 500 xalign 0.5
|
|
|
|
null height 5
|
|
|
|
|
|
|
|
if selected_category:
|
|
|
|
hbox:
|
|
|
|
for subcategory in character.wardrobe[selected_category]:
|
|
|
|
button:
|
|
|
|
add wardrobe.get_icon(subcategory) xysize (64, 64)
|
|
|
|
tooltip "[subcategory]"
|
|
|
|
action SetScreenVariable("selected_subcategory", subcategory)
|
|
|
|
|
|
|
|
null height 5
|
|
|
|
add "frame_spacer" xsize 500 xalign 0.5
|
|
|
|
null height 5
|
|
|
|
|
|
|
|
if selected_subcategory:
|
|
|
|
vpgrid:
|
|
|
|
cols 5
|
|
|
|
ysize 399
|
|
|
|
xspacing 5
|
|
|
|
yspacing 5
|
|
|
|
mousewheel True
|
|
|
|
scrollbars "vertical"
|
|
|
|
for item in character.wardrobe[selected_category][selected_subcategory]:
|
|
|
|
add item.button
|
|
|
|
add character.image align (1.0, 1.0) zoom 0.6
|
|
|
|
textbutton "Return" action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym "game_menu" align (1.0, 0)
|
|
|
|
|
|
|
|
style wardrobe_item_button is empty:
|
|
|
|
background Transform("wheelmenu_button", xysize=(96,96))
|
|
|
|
hover_background At(Transform("wheelmenu_button_opaque", xysize=(96,96)), wheelmenu_hover_anim)
|
|
|
|
selected_foreground Transform("#ffffff", alpha=0.5)
|
2024-04-18 15:57:31 +00:00
|
|
|
hover_sound "sounds/qubodup-hover1.ogg"
|
2024-10-13 08:38:11 +00:00
|
|
|
activate_sound "sounds/qubodup-click2.ogg"
|
|
|
|
# anchor (0.5, 0.5)
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-10-13 08:38:11 +00:00
|
|
|
style wardrobe_item_button_inadequate is empty:
|
|
|
|
background Transform("wheelmenu_button", xysize=(64,64))
|
|
|
|
hover_background At(Transform("wheelmenu_button_opaque", xysize=(64,64), matrixcolor=TintMatrix("#ff0000")), wheelmenu_hover_anim)
|
|
|
|
hover_sound "sounds/qubodup-hover1.ogg"
|
|
|
|
activate_sound "sounds/qubodup-click2.ogg"
|
|
|
|
# anchor (0.5, 0.5)
|
|
|
|
|
|
|
|
style wardrobe_frame is empty:
|
|
|
|
xsize 540
|
|
|
|
yfill True
|
|
|
|
padding (10, 10)
|
|
|
|
background Frame(Image("gui/creamy_pumpkin_pie/side_frame.png", oversample=4), 0, 100, 9, 75, tile=False)
|