Fix for older key drops (multidata still uses the old address calculation)
This commit is contained in:
@@ -868,7 +868,7 @@ def init_lookups(ctx):
|
|||||||
ctx.lookup_name_to_id[loc_name] = location_id
|
ctx.lookup_name_to_id[loc_name] = location_id
|
||||||
ctx.lookup_id_to_name[location_id] = loc_name
|
ctx.lookup_id_to_name[location_id] = loc_name
|
||||||
uw_table = DataTables.get_uw_enemy_table()
|
uw_table = DataTables.get_uw_enemy_table()
|
||||||
key_drop_data = {(v[1][1], v[1][2]): k for k, v in PotShuffle.key_drop_data.items() if v[1] == 'Drop'}
|
key_drop_data = {(v[1][1], v[1][2]): k for k, v in PotShuffle.key_drop_data.items() if v[0] == 'Drop'}
|
||||||
for super_tile, enemy_list in uw_table.room_map.items():
|
for super_tile, enemy_list in uw_table.room_map.items():
|
||||||
index_adj = 0
|
index_adj = 0
|
||||||
for index, sprite in enumerate(enemy_list):
|
for index, sprite in enumerate(enemy_list):
|
||||||
@@ -877,12 +877,13 @@ def init_lookups(ctx):
|
|||||||
continue
|
continue
|
||||||
if (super_tile, index) in key_drop_data:
|
if (super_tile, index) in key_drop_data:
|
||||||
loc_name = key_drop_data[(super_tile, index)]
|
loc_name = key_drop_data[(super_tile, index)]
|
||||||
|
location_id = PotShuffle.key_drop_data[loc_name][1][0]
|
||||||
else:
|
else:
|
||||||
loc_name = f'{sprite.region} Enemy #{index+1}'
|
loc_name = f'{sprite.region} Enemy #{index+1}'
|
||||||
|
location_id = EnemyList.drop_address(index, super_tile)
|
||||||
if index < index_adj:
|
if index < index_adj:
|
||||||
logging.info(f'Problem at {hex(super_tile)} {loc_name}')
|
logging.info(f'Problem at {hex(super_tile)} {loc_name}')
|
||||||
location_table_sprite_items[loc_name] = (2 * super_tile, 0x8000 >> (index-index_adj))
|
location_table_sprite_items[loc_name] = (2 * super_tile, 0x8000 >> (index-index_adj))
|
||||||
location_id = EnemyList.drop_address(index, super_tile)
|
|
||||||
ctx.lookup_name_to_id[loc_name] = location_id
|
ctx.lookup_name_to_id[loc_name] = location_id
|
||||||
ctx.lookup_id_to_name[location_id] = loc_name
|
ctx.lookup_id_to_name[location_id] = loc_name
|
||||||
|
|
||||||
|
|||||||
@@ -370,14 +370,15 @@ def init_lookups(ctx):
|
|||||||
ctx.lookup_name_to_id[loc_name] = location_id
|
ctx.lookup_name_to_id[loc_name] = location_id
|
||||||
ctx.lookup_id_to_name[location_id] = loc_name
|
ctx.lookup_id_to_name[location_id] = loc_name
|
||||||
uw_table = DataTables.get_uw_enemy_table()
|
uw_table = DataTables.get_uw_enemy_table()
|
||||||
key_drop_data = {(v[1][1], v[1][2]): k for k, v in PotShuffle.key_drop_data.items() if v[1] == 'Drop'}
|
key_drop_data = {(v[1][1], v[1][2]): k for k, v in PotShuffle.key_drop_data.items() if v[0] == 'Drop'}
|
||||||
for super_tile, enemy_list in uw_table.room_map.items():
|
for super_tile, enemy_list in uw_table.room_map.items():
|
||||||
for index, sprite in enumerate(enemy_list):
|
for index, sprite in enumerate(enemy_list):
|
||||||
if (super_tile, index) in key_drop_data:
|
if (super_tile, index) in key_drop_data:
|
||||||
loc_name = key_drop_data[(super_tile, index)]
|
loc_name = key_drop_data[(super_tile, index)]
|
||||||
|
location_id = PotShuffle.key_drop_data[loc_name][1][0]
|
||||||
else:
|
else:
|
||||||
loc_name = f'{sprite.region} Enemy #{index+1}'
|
loc_name = f'{sprite.region} Enemy #{index+1}'
|
||||||
location_id = EnemyList.drop_address(index, super_tile)
|
location_id = EnemyList.drop_address(index, super_tile)
|
||||||
ctx.lookup_name_to_id[loc_name] = location_id
|
ctx.lookup_name_to_id[loc_name] = location_id
|
||||||
ctx.lookup_id_to_name[location_id] = loc_name
|
ctx.lookup_id_to_name[location_id] = loc_name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user