Simplify ShopSlot Shuffling

This commit is contained in:
Fabian Dill
2021-01-10 19:23:57 +01:00
parent 52d5b96435
commit f12259dd7d
5 changed files with 49 additions and 68 deletions

View File

@@ -415,9 +415,11 @@ def create_shops(world, player: int):
else:
if my_shop_slots.pop():
additional_item = world.random.choice(['Rupees (50)', 'Rupees (100)', 'Rupees (300)'])
world.itempool.append(ItemFactory(additional_item, player))
slot_name = "{} Slot {}".format(shop.region.name, index + 1)
loc = Location(player, slot_name, address=shop_table_by_location[slot_name], parent=shop.region)
loc.shop_slot = True
loc.locked = True
loc.item = ItemFactory(additional_item, player)
shop.region.locations.append(loc)
world.dynamic_locations.append(loc)