note potential optimization locations

wip-faster-paths
magical 2024-02-07 22:59:23 -08:00
parent 2e972d876f
commit d65898994a
1 changed files with 3 additions and 0 deletions

View File

@ -2173,6 +2173,7 @@ def randomize_game(graph):
find_available_areas(graph) find_available_areas(graph)
for location in MajorLocations: for location in MajorLocations:
# potential find_all_available_items
path = graph.get_path(StartLocation, location) path = graph.get_path(StartLocation, location)
if path != None: if path != None:
AccessibleLocations.append(location) AccessibleLocations.append(location)
@ -2251,6 +2252,7 @@ def randomize_game(graph):
if location == 'Data S0' or location == 'Item S0-05-16': if location == 'Data S0' or location == 'Item S0-05-16':
path = graph.get_path(StartLocation, location, depth=250) path = graph.get_path(StartLocation, location, depth=250)
else: else:
# potential find_all_available_items
for area in range(0, 7): for area in range(0, 7):
if location in AreaItemLocations[area]: if location in AreaItemLocations[area]:
if AreaOpen[area]: if AreaOpen[area]:
@ -2322,6 +2324,7 @@ def randomize_game(graph):
tankCheck = math.ceil(healthCheck / MissileDamage / 5) tankCheck = math.ceil(healthCheck / MissileDamage / 5)
PossibleMissileTanks.clear() PossibleMissileTanks.clear()
if SeedSettings['MajorMinor']: if SeedSettings['MajorMinor']:
# potential find_all_available_items + could probably reuse previous result
for missileLocation in MinorLocations: for missileLocation in MinorLocations:
if missileLocation not in UsedLocations: if missileLocation not in UsedLocations:
missilePath = None missilePath = None