mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
SM: 20221101 update (#1479)
This adds support to most of Varia's 20221101 update. Notably, added Options for: - Objectives - Tourian - RelaxedRoundRobinCF As well as previously unsupported Options: - EscapeRando - RemoveEscapeEnemies - HideItems
This commit is contained in:
@@ -31,7 +31,7 @@ class RandoExec(object):
|
||||
vcr = VCR(self.seedName, 'rando') if self.vcr == True else None
|
||||
self.errorMsg = ""
|
||||
split = self.randoSettings.restrictions['MajorMinor']
|
||||
graphBuilder = GraphBuilder(self.graphSettings)
|
||||
self.graphBuilder = GraphBuilder(self.graphSettings)
|
||||
container = None
|
||||
i = 0
|
||||
attempts = 500 if self.graphSettings.areaRando or self.graphSettings.doorsColorsRando or split == 'Scavenger' else 1
|
||||
@@ -44,23 +44,28 @@ class RandoExec(object):
|
||||
self.restrictions = Restrictions(self.randoSettings)
|
||||
if self.graphSettings.doorsColorsRando == True:
|
||||
DoorsManager.randomize(self.graphSettings.allowGreyDoors, self.player)
|
||||
self.areaGraph = graphBuilder.createGraph()
|
||||
self.areaGraph = self.graphBuilder.createGraph(self.randoSettings.maxDiff)
|
||||
services = RandoServices(self.areaGraph, self.restrictions)
|
||||
setup = RandoSetup(self.graphSettings, Logic.locations, services, self.player)
|
||||
self.setup = setup
|
||||
container = setup.createItemLocContainer(endDate, vcr)
|
||||
if container is None:
|
||||
sys.stdout.write('*')
|
||||
sys.stdout.flush()
|
||||
i += 1
|
||||
else:
|
||||
self.errorMsg += '\n'.join(setup.errorMsgs)
|
||||
self.errorMsg += '; '.join(setup.errorMsgs)
|
||||
now = time.process_time()
|
||||
if container is None:
|
||||
if self.graphSettings.areaRando:
|
||||
self.errorMsg += "Could not find an area layout with these settings"
|
||||
else:
|
||||
self.errorMsg += "Unable to process settings"
|
||||
self.errorMsg += "Could not find an area layout with these settings; "
|
||||
if self.graphSettings.doorsColorsRando:
|
||||
self.errorMsg += "Could not find a door color combination with these settings; "
|
||||
if split == "Scavenger":
|
||||
self.errorMsg += "Scavenger seed generation timed out; "
|
||||
if setup.errorMsgs:
|
||||
self.errorMsg += '; '.join(setup.errorMsgs)
|
||||
if self.errorMsg == "":
|
||||
self.errorMsg += "Unable to process settings; "
|
||||
self.areaGraph.printGraph()
|
||||
return container
|
||||
|
||||
|
||||
Reference in New Issue
Block a user