Skip to content

Commit

Permalink
Add complex single path tiles
Browse files Browse the repository at this point in the history
Player draw bug fixes
  • Loading branch information
KrisDavie committed Oct 8, 2023
1 parent 16a8ad8 commit eaa40dd
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 16 deletions.
60 changes: 46 additions & 14 deletions data/doors_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9150,18 +9150,59 @@ def add_manual_drop(source, source_eg_tile, dest_eg_tile, dest_region=None):
add_manual_drop("GT Moldorm Hole", 0x4D, 0xA6)

# These are tiles which only have single paths through them and can be ignored when mapping
simple_tiles = (
complex_tiles = {
(7, 5): {
"paths": [{"Skull Pot Prison ES", "Skull Pot Prison SE"}, {"Skull 2 East Lobby SW", "Skull 2 East Lobby WS"}],
},
(4, 1): {
"paths": [{"TR Lava Escape SE", "TR Lava Escape NW"}, {"TR Lava Island WS", "TR Lava Island ES"}],
},
(10, 6): {
"paths": [{"PoD Dark Basement E Up Stairs", "PoD Dark Basement W Up Stairs"}],
},
(5, 7): {
"paths": [{"Desert Arrow Pot Corner W Edge", "Desert Arrow Pot Corner S Edge"}],
},
(2, 8): {
"paths": [
{"Hyrule Dungeon South Abyss North Edge", "Hyrule Dungeon South Abyss West Edge"},
{"Hyrule Dungeon South Abyss Catwalk North Edge", "Hyrule Dungeon South Abyss Catwalk West Edge"},
],
},
(2, 10): {
"paths": [{"Mire Over Bridge E", "Mire Over Bridge W"}],
},
(10, 10): {
"paths": [{"Eastern Map Valley WN", "Eastern Map Valley SW"}],
},
(2, 11): {
"paths": [{"Mire BK Door Room N", "Mire BK Door Room EN"}],
},
(9, 11): {
"paths": [
{"Eastern Canonball Ledge Key Door EN", "Eastern Canonball Ledge Key Door WN"},
{"Eastern Canonball S", "Eastern Canonball N"},
],
},
(3, 12): {
"paths": [{"Mire Failure Bridge W", "Mire Failure Bridge E"}],
},
(6, 13): {
"paths": [{"TR Main Lobby SE", "TR Lobby Ledge NE"}],
},
}

simple_tiles = {
(2, 0),
(4, 0),
(11, 0),
(15, 0),
(16, 1),
(14, 1),
# (12, 1), # Ice armos
(12, 1), # Ice armos
(13, 1),
(9, 1),
(6, 1),
# 4, 1, # TR Pipe maze
(3, 1),
(1, 2),
(2, 2),
Expand All @@ -9177,7 +9218,7 @@ def add_manual_drop(source, source_eg_tile, dest_eg_tile, dest_region=None):
(1, 4),
(2, 4),
(3, 4),
# (4, 4), # TT big chest
(4, 4), # TT big chest
(9, 4), # SW Torches
(11, 4),
(12, 4),
Expand All @@ -9186,14 +9227,12 @@ def add_manual_drop(source, source_eg_tile, dest_eg_tile, dest_region=None):
(12, 5),
(11, 5),
(9, 5),
# (7, 5), # Two different single paths
(3, 5),
(1, 5),
(0, 5),
(3, 6),
(4, 6),
(6, 6),
# (10, 6), # PoD dark basement
(11, 6),
(12, 6),
(13, 6),
Expand All @@ -9202,35 +9241,28 @@ def add_manual_drop(source, source_eg_tile, dest_eg_tile, dest_region=None):
(3, 7),
(1, 7),
(0, 7),
(2, 8),
(3, 8),
(14, 8),
(15, 9),
(9, 9),
(8, 9),
# (6, 9), # GT Staredown
(5, 9),
(3, 9),
(2, 9),
(1, 9),
(0, 10),
(1, 10),
# (2, 10), Only the cross bridge
(3, 10),
(5, 10),
(10, 10),
(11, 10),
(14, 10),
(15, 10),
# (14, 11), # Ice pre kholdstare room dropdown
(10, 11),
# (9, 11), # EP cannonballs
(8, 11),
(5, 11),
(4, 11),
(0, 11),
(0, 12),
# (3, 11), # Mire big chest tile, only middle left bridge
(4, 12),
(7, 12),
(9, 12),
Expand All @@ -9241,4 +9273,4 @@ def add_manual_drop(source, source_eg_tile, dest_eg_tile, dest_region=None):
(2, 13),
(0, 13),
(0, 14),
)
}
17 changes: 15 additions & 2 deletions gui/Doors/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
vanilla_logical_connections,
dungeon_warps,
simple_tiles,
complex_tiles,
)

from pathlib import Path
Expand Down Expand Up @@ -341,7 +342,7 @@ def redraw_canvas(self: DoorPage):

if self.experimental_flags["hide_single_route_tiles"]:
lobbies = [x["door"] for x in self.lobby_doors]
for tile in simple_tiles:
for tile in simple_tiles | complex_tiles.keys():
if tile not in self.tiles or tile in self.pinned_eg_tiles:
continue
all_door_links = {}
Expand All @@ -356,11 +357,19 @@ def redraw_canvas(self: DoorPage):
# This is a lobby
if door["name"] in lobbies:
skip_tile = True
# This has an unlinked doot
# This has an unlinked door
if door["name"] not in all_door_links and door["name"] not in all_door_links_inverse:
skip_tile = True
else:
linked_doors.append(door["name"])
if tile in complex_tiles:
all_paths = set()
for path in complex_tiles[tile]["paths"]:
all_paths = all_paths | path
if (set(linked_doors) in complex_tiles[tile]["paths"]) or (set(linked_doors) == all_paths):
skip_tile = False
else:
skip_tile = True
if skip_tile:
continue

Expand Down Expand Up @@ -1532,6 +1541,8 @@ def auto_add_tile(self, selected_eg_tile, was_lit=False):
if self.experimental_flags["hide_single_route_tiles"]:
if selected_eg_tile in self.holdover_tiles:
return
if selected_eg_tile in self.tiles:
return
tile_x = tile_y = 0
for tile in self.unused_map_tiles:
if tile not in [
Expand Down Expand Up @@ -1664,6 +1675,8 @@ def auto_draw_player(self, x, y, current_tile):
if self.experimental_flags["hide_single_route_tiles"]:
if current_tile in self.holdover_tiles:
return
if current_tile not in self.tiles:
return
try:
self.canvas.delete("player")
except:
Expand Down

0 comments on commit eaa40dd

Please sign in to comment.