fix items not being placed on bosses
bosses were considered unreachable when LimitArea was in effect because they don't have a sector identifier (e.g. "S2") in their names.
parent
ed0a382cbe
commit
1913f51f00
|
@ -27,6 +27,7 @@ class Game:
|
||||||
self.majorItemLocations = list()
|
self.majorItemLocations = list()
|
||||||
self.minorItemLocations = list()
|
self.minorItemLocations = list()
|
||||||
self.itemLocations = list()
|
self.itemLocations = list()
|
||||||
|
self.itemArea = dict()
|
||||||
self.patcher = dict()
|
self.patcher = dict()
|
||||||
self.graph.clear()
|
self.graph.clear()
|
||||||
self.areaConnections.clear()
|
self.areaConnections.clear()
|
||||||
|
@ -234,6 +235,7 @@ class Game:
|
||||||
for area in range(0, 7):
|
for area in range(0, 7):
|
||||||
if 'S{}'.format(area) in start:
|
if 'S{}'.format(area) in start:
|
||||||
if 'S{}'.format(area) not in point:
|
if 'S{}'.format(area) not in point:
|
||||||
|
if self.itemArea.get(point) != area:
|
||||||
return None
|
return None
|
||||||
edge = (start, point)
|
edge = (start, point)
|
||||||
self.queue.append(edge)
|
self.queue.append(edge)
|
||||||
|
|
|
@ -3127,6 +3127,7 @@ def start_randomizer(rom, settings):
|
||||||
BossLocations.append(name)
|
BossLocations.append(name)
|
||||||
if 'Item' in name or nodeType == 'Boss' or nodeType == 'Data':
|
if 'Item' in name or nodeType == 'Boss' or nodeType == 'Data':
|
||||||
AreaItemLocations[areaIndex].append(name)
|
AreaItemLocations[areaIndex].append(name)
|
||||||
|
World.itemArea[name] = areaIndex
|
||||||
|
|
||||||
World.ConnectAllNodes()
|
World.ConnectAllNodes()
|
||||||
StartLocation = 'S0-00'
|
StartLocation = 'S0-00'
|
||||||
|
|
Loading…
Reference in New Issue