fix(algorithm): District algorithm fails if unable to comply with restriction

This commit is contained in:
aerinon
2023-11-15 13:36:09 -07:00
parent f4a702951c
commit 215c80eb4a
2 changed files with 4 additions and 3 deletions

View File

@@ -280,9 +280,10 @@ def recovery_placement(item_to_place, locations, world, state, base_state, itemp
return spot_to_fill
return None
# explicitly fail these cases
elif world.algorithm in ['dungeon_only', 'major_only']:
elif world.algorithm in ['dungeon_only', 'major_only', 'district']:
raise FillError(f'Rare placement for {world.algorithm} detected. {item_to_place} unable to be placed.'
f' Try a different seed')
# I don't think any algorithm uses fallback placement anymore, vanilla is special. Others simply fail.
else:
other_locations = [x for x in locations if x not in attempted]
for location in other_locations: