From 0366198d4405c6c24d0a52800da8350445b2344f Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Sun, 25 Jan 2026 22:05:16 -0600 Subject: [PATCH] Fix spacings --- OverworldShuffle.py | 50 +++++++++++++++++++++--------------------- Rom.py | 16 +++++++------- data/base2current.bps | Bin 156161 -> 156163 bytes 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 635a5398..e144faee 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -128,33 +128,33 @@ def link_overworld(world, player): # restructure Maze Race/Suburb/Frog/Dig Game manually due to NP/P relationship parallel_links_new = bidict(parallel_links) # shallow copy is enough (deep copy is broken) if world.owLayout[player] != 'grid': - if world.owKeepSimilar[player]: - del parallel_links_new['Maze Race ES'] - del parallel_links_new['Kakariko Suburb WS'] - for group in trimmed_groups.keys(): - (std, region, axis, terrain, parallel, _, custom) = group - if parallel == IsParallel.Yes: + if world.owKeepSimilar[player]: + del parallel_links_new['Maze Race ES'] + del parallel_links_new['Kakariko Suburb WS'] + for group in trimmed_groups.keys(): + (std, region, axis, terrain, parallel, _, custom) = group + if parallel == IsParallel.Yes: + (forward_edges, back_edges) = trimmed_groups[group] + if ['Maze Race ES'] in forward_edges: + forward_edges.remove(['Maze Race ES']) + trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][0].append(['Maze Race ES']) + if ['Kakariko Suburb WS'] in back_edges: + back_edges.remove(['Kakariko Suburb WS']) + trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][1].append(['Kakariko Suburb WS']) + trimmed_groups[group] = (forward_edges, back_edges) + else: + for group in trimmed_groups.keys(): + (std, region, axis, terrain, _, _, custom) = group (forward_edges, back_edges) = trimmed_groups[group] - if ['Maze Race ES'] in forward_edges: - forward_edges.remove(['Maze Race ES']) - trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][0].append(['Maze Race ES']) - if ['Kakariko Suburb WS'] in back_edges: - back_edges.remove(['Kakariko Suburb WS']) - trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][1].append(['Kakariko Suburb WS']) + if ['Dig Game EC', 'Dig Game ES'] in forward_edges: + forward_edges.remove(['Dig Game EC', 'Dig Game ES']) + trimmed_groups[(std, region, axis, terrain, IsParallel.Yes, 1, custom)][0].append(['Dig Game ES']) + trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][0].append(['Dig Game EC']) + if ['Frog WC', 'Frog WS'] in back_edges: + back_edges.remove(['Frog WC', 'Frog WS']) + trimmed_groups[(std, region, axis, terrain, IsParallel.Yes, 1, custom)][1].append(['Frog WS']) + trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][1].append(['Frog WC']) trimmed_groups[group] = (forward_edges, back_edges) - else: - for group in trimmed_groups.keys(): - (std, region, axis, terrain, _, _, custom) = group - (forward_edges, back_edges) = trimmed_groups[group] - if ['Dig Game EC', 'Dig Game ES'] in forward_edges: - forward_edges.remove(['Dig Game EC', 'Dig Game ES']) - trimmed_groups[(std, region, axis, terrain, IsParallel.Yes, 1, custom)][0].append(['Dig Game ES']) - trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][0].append(['Dig Game EC']) - if ['Frog WC', 'Frog WS'] in back_edges: - back_edges.remove(['Frog WC', 'Frog WS']) - trimmed_groups[(std, region, axis, terrain, IsParallel.Yes, 1, custom)][1].append(['Frog WS']) - trimmed_groups[(std, region, axis, terrain, IsParallel.No, 1, custom)][1].append(['Frog WC']) - trimmed_groups[group] = (forward_edges, back_edges) parallel_links_new = {**dict(parallel_links_new), **dict({e:p[0] for e, p in parallel_links_new.inverse.items()})} connected_edges = [] diff --git a/Rom.py b/Rom.py index 3fc7c6f1..4c11ba72 100644 --- a/Rom.py +++ b/Rom.py @@ -84,7 +84,7 @@ from Utils import int16_as_bytes, int32_as_bytes, local_path, snes_to_pc from Versions import DRVersion, GKVersion, ORVersion JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '7c5da63adef2706f5ce8e5003ed49900' +RANDOMIZERBASEHASH = '33cd5e308266cf2273c80de1b1df3dac' class JsonRom(object): @@ -1565,12 +1565,12 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): if ent is None or isinstance(ent, int): owid_map = [ 0x1E, 0x30, 0xFF, 0x7B, 0x5E, 0x70, 0x40, 0x75, 0x03, 0x58, 0x47 ] coord_flags = 0x0000 - if ent is None: + if ent is None: # HUD-style dislocated icons x_map_position = [0x0050, 0x0080, 0xFF00, 0x0040, 0x0020, 0x00C0, 0x0060, 0x00A0, 0x00B0, 0x0080, 0x00E0] y_map_position = [0x000C, 0x000C, 0xFF00, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x000C, 0x00D4, 0x00D4] coord_flags = 0x4000 # raw OAM coord flag - idx = int((map_index-2)/2) + idx = int((map_index-2)/2) elif isinstance(ent, int): # vanilla icon positions x_map_position = [0x0F30, 0x0170, 0xFF00, 0x0790, 0x0F30, 0x0160, 0x00F0, 0x0CB0, 0x0900, 0x0240, 0x0F30] @@ -1600,7 +1600,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): coords = (coords[0] + 0x100, coords[1] + 0x100) else: if ent.name in ow_prize_table: - coords = ow_prize_table[ent.name] + coords = ow_prize_table[ent.name] elif door_addresses[ent.name][1] is not None: coords = (door_addresses[ent.name][1][6], door_addresses[ent.name][1][5]) else: @@ -1635,13 +1635,13 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): # prize location write_int16s(rom, snes_to_pc(0x0ABE2E)+(map_index*6)+8, coords) if world.shuffle[player] == 'vanilla' or world.overworld_map[player] == 'default': - swap_entrances = { 'Agahnims Tower': 'Ganons Tower', - 'Ganons Tower': 'Agahnims Tower' } + swap_entrances = { 'Agahnims Tower': 'Ganons Tower', + 'Ganons Tower': 'Agahnims Tower' } if dungeon in swap_entrances: entrance_name = dungeon if world.is_atgt_swapped(player): entrance_name = swap_entrances[dungeon] - entrance = world.get_entrance(entrance_name, player) + entrance = world.get_entrance(entrance_name, player) coords = get_entrance_coords(entrance) else: coords = get_entrance_coords(int((map_index-2)/2)) @@ -1665,7 +1665,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): portal = world.get_portal(portal_list[portal_idx], player) entrance = portal.find_portal_entrance() coords = get_entrance_coords(entrance) - + # figure out compass entrances and what world (light/dark) write_int16s(rom, snes_to_pc(0x0ABE2E)+(map_index*6), coords) if world.prizeshuffle[player] in ['none', 'dungeon', 'nearby'] and dungeon_table[dungeon].prize: diff --git a/data/base2current.bps b/data/base2current.bps index 237246a0eba3fb35240bc9a41af8d28c092aa012..cac30eb84b333f9ddf0def6a461b29adf1b02d93 100644 GIT binary patch delta 74 zcmV-Q0JZ;t#0i7M39x+w1N6rWgMb5vfCB-yfCBCvsR>UUj{pDw delta 72 zcmV-O0Jr~x#0i1K39x+w1NFxWgMb5vfCB-yfCB