SM: failing generation fixes (#1726)

- fixed wrong condition in Collect to assign lastAP
- fixed possible infinite loop in generating output when many SM worlds are present
- fixed new VARIA code that changed a list used for every SM worlds and would throw if many SM worlds uses Aea rando and not AreaLayout
This commit is contained in:
lordlou
2023-04-16 23:46:19 -04:00
committed by GitHub
parent f6758524d5
commit cb634fa8d4
6 changed files with 43 additions and 34 deletions

View File

@@ -362,7 +362,8 @@ class AccessGraph(object):
# test access from an access point to another, given an optional item
def canAccess(self, smbm, srcAccessPointName, destAccessPointName, maxDiff, item=None):
if item is not None:
addAndRemoveItem = item is not None and (smbm.isCountItem(item) or not smbm.haveItem(item))
if addAndRemoveItem:
smbm.addItem(item)
#print("canAccess: item: {}, src: {}, dest: {}".format(item, srcAccessPointName, destAccessPointName))
destAccessPoint = self.accessPoints[destAccessPointName]
@@ -371,7 +372,7 @@ class AccessGraph(object):
can = destAccessPoint in availAccessPoints
# if not can:
# self.log.debug("canAccess KO: avail = {}".format([ap.Name for ap in availAccessPoints.keys()]))
if item is not None:
if addAndRemoveItem:
smbm.removeItem(item)
#print("canAccess: {}".format(can))
return can