untangle start_randomizer
not as bad as some of the functions, but still a couple control flow errorsmaster
parent
707a7b70a1
commit
12a22c8724
|
@ -3065,7 +3065,7 @@ def start_randomizer(rom, settings):
|
||||||
if settings['Num']:
|
if settings['Num']:
|
||||||
if settings['Num'] > repeat:
|
if settings['Num'] > repeat:
|
||||||
repeat = settings['Num']
|
repeat = settings['Num']
|
||||||
settings.pop('Num')
|
settings.pop('Num')
|
||||||
if settings['Patch']:
|
if settings['Patch']:
|
||||||
Patch = True
|
Patch = True
|
||||||
else:
|
else:
|
||||||
|
@ -3124,26 +3124,22 @@ def start_randomizer(rom, settings):
|
||||||
elif nodeType == 'Boss':
|
elif nodeType == 'Boss':
|
||||||
World.add_to_majors(name)
|
World.add_to_majors(name)
|
||||||
BossLocations.append(name)
|
BossLocations.append(name)
|
||||||
else:
|
elif nodeType == 'Data' or item == 'E-Tank':
|
||||||
if nodeType == 'Data' or item == 'E-Tank':
|
World.add_to_majors(name)
|
||||||
World.add_to_majors(name)
|
if name == 'Data S3':
|
||||||
if name == 'Data S3':
|
BossLocations.append(name)
|
||||||
BossLocations.append(name)
|
if 'Item' in name or nodeType == 'Boss' or nodeType == 'Data':
|
||||||
if not 'Item' in name:
|
AreaItemLocations[areaIndex].append(name)
|
||||||
if not nodeType == 'Boss':
|
|
||||||
if nodeType == 'Data':
|
|
||||||
pass
|
|
||||||
AreaItemLocations[areaIndex].append(name)
|
|
||||||
|
|
||||||
World.ConnectAllNodes()
|
World.ConnectAllNodes()
|
||||||
StartLocation = 'S0-00'
|
StartLocation = 'S0-00'
|
||||||
startTime = time.time()
|
startTime = time.time()
|
||||||
randomize_game(World)
|
randomize_game(World)
|
||||||
seedTime = time.time() - startTime
|
seedTime = time.time() - startTime
|
||||||
print(str(FileName))
|
print(str(FileName))
|
||||||
print('Randomized in:', seedTime)
|
print('Randomized in:', seedTime)
|
||||||
|
|
||||||
totalRandoTime = time.time() - totalRandoTime
|
totalRandoTime = time.time() - totalRandoTime
|
||||||
print('All seeds took:', totalRandoTime)
|
print('All seeds took:', totalRandoTime)
|
||||||
return FileName
|
return FileName
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue