forked from SilverStudioGames/WTS
Bug fixes and callbacks
* Added parcel callback support for the outfit store * Added execute_callback wrapper function * Fixed ball quest item never unlocking after receiving the outfit, soft-locking the game
This commit is contained in:
parent
16443b47ae
commit
d8601def73
@ -34,6 +34,8 @@ label purchase_outfit(item):
|
|||||||
maf "As you wish sweetie... It should be ready shortly."
|
maf "As you wish sweetie... It should be ready shortly."
|
||||||
gen "Thank you." ("base", xpos="far_left", ypos="head")
|
gen "Thank you." ("base", xpos="far_left", ypos="head")
|
||||||
elif item == her_outfit_ball:
|
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:
|
if not states.her.ev.yule_ball.e4_complete:
|
||||||
gen "Could you make a dress for me?" ("base", xpos="far_left", ypos="head")
|
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?"
|
maf "A dress? Do you mean something like a ball dress, or more burlesque?"
|
||||||
|
@ -27,6 +27,7 @@ label shop_dress_menu:
|
|||||||
store_cart = set()
|
store_cart = set()
|
||||||
menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting)
|
menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting)
|
||||||
current_item = next(iter(menu_items), None)
|
current_item = next(iter(menu_items), None)
|
||||||
|
parcel_callbacks = []
|
||||||
|
|
||||||
show screen shop_dress()
|
show screen shop_dress()
|
||||||
|
|
||||||
@ -107,14 +108,17 @@ label shop_dress_menu:
|
|||||||
$ _tmp = "tomorrow" if transit_time == 1 else "in about {} days".format(str(transit_time))
|
$ _tmp = "tomorrow" if transit_time == 1 else "in about {} days".format(str(transit_time))
|
||||||
maf "You can expect a parcel [_tmp]."
|
maf "You can expect a parcel [_tmp]."
|
||||||
|
|
||||||
$ Parcel(contents=[(k, 1) for k in store_cart], wait=transit_time).send()
|
# Executes callbacks upon receival of the parcel.
|
||||||
|
$ curry = renpy.curry(execute_callbacks)(parcel_callbacks) if parcel_callbacks else None
|
||||||
|
$ parcel_callbacks = []
|
||||||
|
$ Parcel(contents=[(k, 1) for k in store_cart], wait=transit_time, func=curry).send()
|
||||||
|
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
gen "Nothing has caught my eye I'm afraid." ("base", xpos="far_left", ypos="head")
|
gen "Nothing has caught my eye I'm afraid." ("base", xpos="far_left", ypos="head")
|
||||||
maf "Maybe next time."
|
maf "Maybe next time."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
jump .after_init
|
jump .after_init
|
||||||
|
|
||||||
screen shop_dress():
|
screen shop_dress():
|
||||||
|
@ -222,3 +222,6 @@ init python early:
|
|||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self._callable())
|
return len(self._callable())
|
||||||
|
|
||||||
|
def execute_callbacks(callbacks):
|
||||||
|
[callback() for callback in callbacks]
|
Loading…
Reference in New Issue
Block a user