Generation improvements

Potential fix for overworld problem
This commit is contained in:
aerinon
2020-12-08 11:24:44 -07:00
parent 5c9c9947f3
commit 85d05f625b
5 changed files with 8 additions and 5 deletions

View File

@@ -1575,6 +1575,8 @@ def assign_crystal_switch_sectors(dungeon_map, crystal_switches, crystal_barrier
valid = global_pole.is_valid_choice(dungeon_map, builder_choice, test_set)
assign_sector(switch_choice, builder_choice, crystal_switches, global_pole)
return crystal_switches
if len(crystal_switches) == 0:
raise GenerationException('No crystal switches to assign')
sector_list = list(crystal_switches)
choices = random.sample(sector_list, k=len(population))
for i, choice in enumerate(choices):