untangle find_available_areas

master
magical 2024-02-03 01:07:16 -08:00
parent 9f22730870
commit afde644b38
1 changed files with 163 additions and 163 deletions

View File

@ -1629,177 +1629,177 @@ def find_available_areas(graph):
path = graph.get_path(check, StartLocation) path = graph.get_path(check, StartLocation)
if path != None: if path != None:
AreaOpen[0] = check AreaOpen[0] = check
if AreaOpen[1] == None:
check = 'S1-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[1] = check
if ScrewAttack:
if AreaOpen[1] == None: if AreaOpen[1] == None:
check = 'S1-00' check = 'S1-6B'
path = graph.get_path(StartLocation, check) path = graph.get_path(StartLocation, check)
if path != None: if path != None:
path = graph.get_path(check, StartLocation) path = graph.get_path(check, StartLocation)
if path != None: if path != None:
AreaOpen[1] = check AreaOpen[1] = check
if ScrewAttack: if AreaOpen[1] == None:
if AreaOpen[1] == None: check = 'S1-68'
check = 'S1-6B' path = graph.get_path(StartLocation, check)
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[1] = check
if AreaOpen[1] == None:
check = 'S1-68'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[1] = check
if AreaOpen[2] == None:
check = 'S2-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[2] = check
if ScrewAttack:
if AreaOpen[2] == None:
check = 'S2-7F'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[2] = check
if AreaOpen[2] == None:
check = 'S2-82'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[2] = check
if AreaOpen[3] == None:
check = 'S3-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[3] = check
if ScrewAttack:
if AreaOpen[3] == None:
check = 'S3-56'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[3] = check
if AreaOpen[3] == None:
check = 'S3-59'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[3] = check
if AreaOpen[4] == None:
check = 'S4-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[4] = check
if ScrewAttack:
if AreaOpen[4] == None:
check = 'S4-6A'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[4] = check
if AreaOpen[4] == None:
check = 'S4-6C'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[4] = check
if AreaOpen[5] == None:
check = 'S5-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[5] = check
if ScrewAttack:
if AreaOpen[5] == None:
check = 'S5-53'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[5] = check
if AreaOpen[6] == None:
check = 'S6-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[6] = check
if ScrewAttack:
if AreaOpen[6] == None:
check = 'S6-51'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[6] = check
if AreaOpen[6] == None:
check = 'S6-54'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[6] = check
if BlueDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-1', depth=250)
if path != None:
enable_item(graph, 'BlueDoors')
path = graph.get_path('Security-Level-1', StartLocation, depth=250)
if path == None:
disable_item(graph, 'BlueDoors')
if GreenDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-2', depth=250)
if path != None:
enable_item(graph, 'GreenDoors')
path = graph.get_path('Security-Level-2', StartLocation, depth=250)
if path == None:
disable_item(graph, 'GreenDoors')
elif SeedSettings['SplitSecurity'] == False:
enable_item(graph, 'BlueDoors')
if YellowDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-3', depth=250)
if path != None:
enable_item(graph, 'YellowDoors')
path = graph.get_path('Security-Level-3', StartLocation, depth=250)
if path == None:
disable_item(graph, 'YellowDoors')
elif SeedSettings['SplitSecurity'] == False:
enable_item(graph, 'GreenDoors')
enable_item(graph, 'BlueDoors')
if RedDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-4', depth=250)
if path != None:
enable_item(graph, 'RedDoors')
path = graph.get_path('Security-Level-4', StartLocation, depth=250)
if path == None:
disable_item(graph, 'RedDoors')
elif SeedSettings['SplitSecurity'] == False:
enable_item(graph, 'YellowDoors')
enable_item(graph, 'GreenDoors')
enable_item(graph, 'BlueDoors')
if WaterLowered == False:
path = graph.get_path(StartLocation, 'S4-00')
if path != None: if path != None:
path = graph.get_path('S4-00', 'Water Pump', True) path = graph.get_path(check, StartLocation)
if path != None: if path != None:
enable_item(graph, 'WaterLowered') AreaOpen[1] = check
path = graph.get_path('Water Pump', 'S4-00', True) if AreaOpen[2] == None:
if path == None: check = 'S2-00'
disable_item(graph, 'WaterLowered') path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[2] = check
if ScrewAttack:
if AreaOpen[2] == None:
check = 'S2-7F'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[2] = check
if AreaOpen[2] == None:
check = 'S2-82'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[2] = check
if AreaOpen[3] == None:
check = 'S3-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[3] = check
if ScrewAttack:
if AreaOpen[3] == None:
check = 'S3-56'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[3] = check
if AreaOpen[3] == None:
check = 'S3-59'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[3] = check
if AreaOpen[4] == None:
check = 'S4-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[4] = check
if ScrewAttack:
if AreaOpen[4] == None:
check = 'S4-6A'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[4] = check
if AreaOpen[4] == None:
check = 'S4-6C'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[4] = check
if AreaOpen[5] == None:
check = 'S5-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[5] = check
if ScrewAttack:
if AreaOpen[5] == None:
check = 'S5-53'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[5] = check
if AreaOpen[6] == None:
check = 'S6-00'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[6] = check
if ScrewAttack:
if AreaOpen[6] == None:
check = 'S6-51'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[6] = check
if AreaOpen[6] == None:
check = 'S6-54'
path = graph.get_path(StartLocation, check)
if path != None:
path = graph.get_path(check, StartLocation)
if path != None:
AreaOpen[6] = check
if BlueDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-1', depth=250)
if path != None:
enable_item(graph, 'BlueDoors')
path = graph.get_path('Security-Level-1', StartLocation, depth=250)
if path == None:
disable_item(graph, 'BlueDoors')
if GreenDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-2', depth=250)
if path != None:
enable_item(graph, 'GreenDoors')
path = graph.get_path('Security-Level-2', StartLocation, depth=250)
if path == None:
disable_item(graph, 'GreenDoors')
elif SeedSettings['SplitSecurity'] == False:
enable_item(graph, 'BlueDoors')
if YellowDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-3', depth=250)
if path != None:
enable_item(graph, 'YellowDoors')
path = graph.get_path('Security-Level-3', StartLocation, depth=250)
if path == None:
disable_item(graph, 'YellowDoors')
elif SeedSettings['SplitSecurity'] == False:
enable_item(graph, 'GreenDoors')
enable_item(graph, 'BlueDoors')
if RedDoors == False:
path = graph.get_path(StartLocation, 'Security-Level-4', depth=250)
if path != None:
enable_item(graph, 'RedDoors')
path = graph.get_path('Security-Level-4', StartLocation, depth=250)
if path == None:
disable_item(graph, 'RedDoors')
elif SeedSettings['SplitSecurity'] == False:
enable_item(graph, 'YellowDoors')
enable_item(graph, 'GreenDoors')
enable_item(graph, 'BlueDoors')
if WaterLowered == False:
path = graph.get_path(StartLocation, 'S4-00')
if path != None:
path = graph.get_path('S4-00', 'Water Pump', True)
if path != None:
enable_item(graph, 'WaterLowered')
path = graph.get_path('Water Pump', 'S4-00', True)
if path == None:
disable_item(graph, 'WaterLowered')
def randomize_game(graph): def randomize_game(graph):