Skip to content

Commit

Permalink
SM: item link replacement fix (#2597)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordlou authored Dec 16, 2023
1 parent 6c4fdc9 commit c56cbd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion worlds/sm/variaRandomizer/rando/GraphBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def escapeTrigger(self, emptyContainer, graph, maxDiff, escapeTrigger):
ap = "Landing Site" # dummy value it'll be overwritten at first collection
while len(itemLocs) > 0 and not (sm.canPassG4() and graph.canAccess(sm, ap, "Landing Site", maxDiff)):
il = itemLocs.pop(0)
if il.Location.restricted or il.Item.Type == "ArchipelagoItem":
# can happen with item links replacement items that its not in the container's itemPool
if il.Location.restricted or il.Item.Type == "ArchipelagoItem" or il.Item not in container.itemPool:
continue
self.log.debug("collecting " + getItemLocStr(il))
container.collect(il)
Expand Down

0 comments on commit c56cbd0

Please sign in to comment.