forked from SilverStudioGames/WTS
Simplify that call
This commit is contained in:
parent
49fe8f4902
commit
07d0c7b151
@ -25,7 +25,7 @@ label shop_dress_menu:
|
|||||||
category_items = {"hermione": hermione.outfits, "tonks": tonks.outfits, "cho": cho.outfits, "luna": luna.outfits, "astoria": astoria.outfits, "susan": susan.outfits}
|
category_items = {"hermione": hermione.outfits, "tonks": tonks.outfits, "cho": cho.outfits, "luna": luna.outfits, "astoria": astoria.outfits, "susan": susan.outfits}
|
||||||
current_category = "hermione"
|
current_category = "hermione"
|
||||||
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 (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting)
|
||||||
current_item = next(iter(menu_items), None)
|
current_item = next(iter(menu_items), None)
|
||||||
parcel_callbacks = []
|
parcel_callbacks = []
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ label shop_dress_menu:
|
|||||||
|
|
||||||
if _choice[0] == "category":
|
if _choice[0] == "category":
|
||||||
$ current_category = _choice[1]
|
$ current_category = _choice[1]
|
||||||
$ 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 (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting)
|
||||||
$ current_item = next(iter(menu_items), None)
|
$ current_item = next(iter(menu_items), None)
|
||||||
elif _choice[0] == "buy":
|
elif _choice[0] == "buy":
|
||||||
show screen blktone
|
show screen blktone
|
||||||
@ -51,7 +51,7 @@ label shop_dress_menu:
|
|||||||
play sound "sounds/money.ogg"
|
play sound "sounds/money.ogg"
|
||||||
$ game.gold -= _choice[1].price
|
$ game.gold -= _choice[1].price
|
||||||
$ store_cart.add(_choice[1])
|
$ store_cart.add(_choice[1])
|
||||||
$ 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 (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting)
|
||||||
$ current_item = next(iter(menu_items), None)
|
$ current_item = next(iter(menu_items), None)
|
||||||
|
|
||||||
if len(store_cart) < 5:
|
if len(store_cart) < 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user