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

@@ -91,9 +91,12 @@ class SMBoolManager(object):
return itemsDict
def withItem(self, item, func):
self.addItem(item)
addAndRemoveItem = self.isCountItem(item) or not self.haveItem(item)
if addAndRemoveItem:
self.addItem(item)
ret = func(self)
self.removeItem(item)
if addAndRemoveItem:
self.removeItem(item)
return ret
def resetItems(self):