Clothing Store 2.0 - Parcel hooks and animations

This commit is contained in:
LoafyLemon 2024-11-14 15:03:20 +00:00
parent 2a55ca692c
commit 737ba3cf09
7 changed files with 249 additions and 41 deletions

BIN
game/gui/creamy_pumpkin_pie/button_check_checked.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/button_check_empty.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -45,6 +45,18 @@ transform gui_modal_popup:
on hide:
easeout_back 0.4 zoom 0.0 alpha 0.0
transform gui_modal_show:
subpixel True
zoom 0.0
alpha 0.0
easein_back 0.4 zoom 1.0 alpha 1.0
transform gui_modal_hide:
subpixel True
zoom 1.0
alpha 1.0
easeout_back 0.4 zoom 0.0 alpha 0.0
image gui_fade_bottom = Frame(Image("gui/creamy_pumpkin_pie/fade_bottom.png", oversample=4), ysize=150, yalign=1.0)
image gui_fade_both = Fixed(Frame(Image("gui/creamy_pumpkin_pie/fade_top.png", oversample=4)), Frame(Image("gui/creamy_pumpkin_pie/fade_bottom.png", oversample=4)))
@ -94,5 +106,6 @@ style frame_button is button:
style frame_button_text is choice_text:
align (0.5, 0.5)
insensitive_color "#888"
image frame_spacer = Image("gui/creamy_pumpkin_pie/window_frame_spacer.png", oversample=4)

View File

@ -1,11 +1,9 @@
label discuss_outfit(item):
label clothing_store_discuss(item):
#
# Hermione Granger
#
if item == her_outfit_maid:
$ maid_outfit_ITEM.owned = 1
gen "I'd like to order a maid outfit." ("base", xpos="far_left", ypos="head")
maf "A maid outfit, what on earth for? Surely the house elves are keeping your office tidy."
gen "The what?" ("base", xpos="far_left", ypos="head")
@ -34,8 +32,6 @@ label discuss_outfit(item):
maf "As you wish sweetie... It should be ready shortly."
gen "Thank you." ("base", xpos="far_left", ypos="head")
elif item == her_outfit_ball:
$ parcel_callbacks.append(renpy.curry(setattr)(ball_outfit_ITEM, "owned", 1))
if not states.her.ev.yule_ball.e4_complete:
gen "Could you make a dress for me?" ("base", xpos="far_left", ypos="head")
maf "A dress? Do you mean something like a ball dress, or more burlesque?"
@ -1012,3 +1008,24 @@ label discuss_outfit(item):
gen "Excellent." ("base", xpos="far_left", ypos="head")
maf "I'll get it done as soon as I can."
return
label clothing_store_cart_full():
random:
maf "That was your fifth order, sir, I'm afraid it will have to be your last one."
maf "Love, I only have two hands. Five outfits is the maximum I can carry."
maf "I'm sorry, but I don't think that's going to work. Five orders at once is enough for me."
maf "I'm afraid I can't do more than five outfits at a time."
maf "Headmaster, more than five orders at once? That's too much for the little ol' me!"
return
label clothing_store_checkout(transit_time, cart):
$ _tmp = "tomorrow" if transit_time == 1 else f"in about {{number={transit_time}}} days"
maf "You can expect a parcel [_tmp]."
if her_outfit_maid in cart:
$ maid_outfit_ITEM.owned = 1
if her_outfit_ball in cart:
$ clothing_store.parcel_callbacks.append(renpy.curry(setattr)(ball_outfit_ITEM, "owned", 1))
return

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
# This file contains functions, utilities, and hacks for the Ren'py engine. Sometimes a dev must do something to get it to work with Ren'py. :)
python early hide:
import functools
@ -383,3 +385,14 @@ init -100 python:
def __call__(self):
renpy.set_return_stack([])
renpy.call(self.label, *self.args, **self.kwargs)
# Allows calling screens in new contexts directly.
@renpy.pure
def _call_screen_in_new_context(screen, *args, **kwargs):
return renpy.call_in_new_context("__call_screen_in_new_context", screen, *args, **kwargs)
renpy.call_screen_in_new_context = _call_screen_in_new_context
label __call_screen_in_new_context(screen, *args, **kwargs):
call screen expression screen pass (*args, **kwargs)
return

View File

@ -772,10 +772,10 @@ style wardrobe_viewport:
style wardrobe_checkbox_button:
padding (6, 4)
hover_background Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 0, 20, 0, tile=False)
foreground Transform(Image("gui/creamy_pumpkin_pie/book/book_button_check_empty.png", oversample=4), xpos=6, yalign=0.5)
selected_foreground Transform(Image("gui/creamy_pumpkin_pie/book/book_button_check_checked.png", oversample=4), xpos=6, yalign=0.5)
insensitive_foreground Transform(Image("gui/creamy_pumpkin_pie/book/book_button_check_empty.png", oversample=4), alpha=0.5, xpos=6, yalign=0.5)
# hover_background Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 0, 20, 0, tile=False)
foreground Transform(Image("gui/creamy_pumpkin_pie/button_check_empty.png", oversample=4), xpos=6, yalign=0.5)
selected_foreground Transform(Image("gui/creamy_pumpkin_pie/button_check_checked.png", oversample=4), xpos=6, yalign=0.5)
insensitive_foreground Transform(Image("gui/creamy_pumpkin_pie/button_check_empty.png", oversample=4), alpha=0.5, xpos=6, yalign=0.5)
style wardrobe_checkbox_button_text is wardrobe_button_text:
first_indent 24
@ -798,6 +798,15 @@ transform wardrobe_hide:
alpha 1.0
easeout 0.4 xpos -1080 alpha 0.0
transform wardrobe_fade_show:
alpha 0.0
easein 0.4 alpha 1.0
transform wardrobe_fade_hide:
events False
alpha 1.0
easeout 0.4 alpha 0.0
transform wardrobe_character_show:
xoffset 1080
easein 0.4 xoffset 0