Merge remote-tracking branch 'upstream/DoorDevUnstable' into OverworldShuffleDev

This commit is contained in:
codemann8
2021-05-01 12:57:41 -05:00
10 changed files with 162 additions and 40 deletions

9
Rom.py
View File

@@ -16,7 +16,7 @@ from BaseClasses import CollectionState, ShopType, Region, Location, OWEdge, Doo
from DoorShuffle import compass_data, DROptions, boss_indicator
from Dungeons import dungeon_music_addresses
from KeyDoorShuffle import count_locations_exclude_logic
from Regions import location_table, shop_to_location_table
from Regions import location_table, shop_to_location_table, retro_shops
from RoomData import DoorKind
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable
from Text import Uncle_texts, Ganon1_texts, TavernMan_texts, Sahasrahla2_texts, Triforce_texts, Blind_texts, BombShop2_texts, junk_texts
@@ -1588,8 +1588,11 @@ def write_custom_shops(rom, world, player):
break
if world.shopsanity[player] or shop.type == ShopType.TakeAny:
rom.write_byte(0x186560 + shop.sram_address + index, 1)
loc_item = world.get_location(shop_to_location_table[shop.region.name][index], player).item
if not loc_item:
if world.shopsanity[player] and shop.region.name in shop_to_location_table:
loc_item = world.get_location(shop_to_location_table[shop.region.name][index], player).item
elif world.shopsanity[player] and shop.region.name in retro_shops:
loc_item = world.get_location(retro_shops[shop.region.name][index], player).item
else:
loc_item = ItemFactory(item['item'], player)
item_id = loc_item.code
price = int16_as_bytes(item['price'])