remove duplicate Shop name in location names

This commit is contained in:
Fabian Dill 2021-01-09 22:48:03 +01:00
parent 00d1f272e8
commit 03552ecf12
4 changed files with 10 additions and 7 deletions

View File

@ -583,7 +583,7 @@ def create_dynamic_shop_locations(world, player):
if item is None:
continue
if item['create_location']:
loc = Location(player, "{} Shop Slot {}".format(shop.region.name, i+1), parent=shop.region)
loc = Location(player, "{} Slot {}".format(shop.region.name, i + 1), parent=shop.region)
shop.region.locations.append(loc)
world.dynamic_locations.append(loc)

View File

@ -416,7 +416,7 @@ def create_shops(world, player: int):
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 = "{} Shop Slot {}".format(shop.region.name, index+1)
slot_name = "{} Slot {}".format(shop.region.name, index + 1)
loc = Location(player, slot_name, address=shop_table_by_location[slot_name], parent=shop.region)
shop.region.locations.append(loc)
world.dynamic_locations.append(loc)
@ -442,8 +442,10 @@ shop_table = {
'Capacity Upgrade': (0x0115, ShopType.UpgradeShop, 0x04, True, True, [('Bomb Upgrade (+5)', 100, 7), ('Arrow Upgrade (+5)', 100, 7)])
}
shop_table_by_location_id = {0x400000 + cnt: s for cnt, s in enumerate( [item for sublist in [ ["{} Shop Slot {}".format(name, num + 1) for num in range(3)] for name in shop_table ] for item in sublist])}
shop_table_by_location = {y:x for x,y in shop_table_by_location_id.items()}
shop_table_by_location_id = {0x400000 + cnt: s for cnt, s in enumerate(
[item for sublist in [["{} Slot {}".format(name, num + 1) for num in range(3)] for name in shop_table] for item in
sublist])}
shop_table_by_location = {y: x for x, y in shop_table_by_location_id.items()}
shop_generation_types = {
'default': _basic_shop_defaults + [('Bombs (3)', 20), ('Green Potion', 90), ('Blue Potion', 190), ('Bee', 10), ('Single Arrow', 5), ('Single Bomb', 10)] + [('Red Shield', 500), ('Blue Shield', 50)],

2
Rom.py
View File

@ -691,7 +691,7 @@ def patch_rom(world, rom, player, team, enemized):
if location.address is None:
continue
if 'Shop Slot' in location.name and location.parent_region.shop is not None:
if location.parent_region.shop and 'Slot' in location.name:
continue
if not location.crystal:

View File

@ -211,8 +211,8 @@ beemizer: # Remove items from the global item pool and replace them with single
2: 0 # 60% of the non-essential item pool is replaced with bee traps, of which 20% could be single bees
3: 0 # 100% of the non-essential item pool is replaced with bee traps, of which 50% could be single bees
4: 0 # 100% of the non-essential item pool is replaced with bee traps
### Item Shuffle (shop)
shop_shuffle_slots: # Maximum amount of allowed shop slots to place item pool items
### Shop Settings ###
shop_shuffle_slots: # Maximum amount of shop slots to be filled with regular item pool items (such as Moon Pearl)
0: 50
5: 0
15: 0
@ -229,6 +229,7 @@ shop_shuffle:
fpu: 0 # Generate new inventories, randomize prices and shuffle capacity upgrades into item pool
uip: 0 # Shuffle inventories, randomize prices and shuffle capacity upgrades into the item pool
# You can add more combos
### End of Shop Section ###
shuffle_prizes: # aka drops
none: 0 # do not shuffle prize packs
g: 50 # shuffle "general" price packs, as in enemy, tree pull, dig etc.