From aed763c58f51efa9c80a8a2ba37aff400da12c4f Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 9 Jan 2021 17:29:31 +0100 Subject: [PATCH] make potion_shop_shuffle more consistent in type use --- BaseClasses.py | 2 +- EntranceRandomizer.py | 2 +- ItemPool.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 8529e601..d46dd7aa 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -135,7 +135,7 @@ class World(object): set_player_attr('triforce_pieces_required', 20) set_player_attr('shop_shuffle', 'off') set_player_attr('shop_shuffle_slots', 0) - set_player_attr('potion_shop_shuffle', 'none') + set_player_attr('potion_shop_shuffle', '') set_player_attr('shuffle_prizes', "g") set_player_attr('sprite_pool', []) set_player_attr('dark_room_logic', "lamp") diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index 2bfe47f4..50bbc33e 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -337,7 +337,7 @@ def parse_arguments(argv, no_defaults=False): help=''' Maximum amount of shop slots able to be filled by items from the item pool. ''') - parser.add_argument('--potion_shop_shuffle', default=defval('none'), choices=['none', 'a'], help='''\ + parser.add_argument('--potion_shop_shuffle', default=defval(''), choices=['', 'a'], help='''\ Determine if potion shop shuffle items should be affected by the rules of shop shuffle. Value `none` will only allow prices to be shuffled, `a` will allow any items to be shuffled. ''') diff --git a/ItemPool.py b/ItemPool.py index cab11009..5759d7df 100644 --- a/ItemPool.py +++ b/ItemPool.py @@ -487,8 +487,9 @@ def shuffle_shops(world, items, player: int): if shop.type == ShopType.UpgradeShop: upgrade_shops.append(shop) elif shop.type == ShopType.Shop: - if shop.region.name == 'Potion Shop' and potion_option in [None, '', 'none']: - upgrade_shops.append(shop) # just put it with the upgrade shops/caves so we don't shuffle the items, just prices + if shop.region.name == 'Potion Shop' and not potion_option: + upgrade_shops.append( + shop) # just put it with the upgrade shops/caves so we don't shuffle the items, just prices else: shops.append(shop) total_inventory.extend(shop.inventory)