Cleanup and generation fix

This commit is contained in:
aerinon
2022-12-01 16:23:11 -07:00
parent 89f467f995
commit 9bf0391e60
3 changed files with 3 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ from Items import ItemFactory
from RoomData import DoorKind, PairedDoor, reset_rooms
from source.dungeon.DungeonStitcher import GenerationException, generate_dungeon
from source.dungeon.DungeonStitcher import ExplorationState as ExplorationState2
# from DungeonGenerator import generate_dungeon
from DungeonGenerator import ExplorationState, convert_regions, pre_validate, determine_required_paths, drop_entrances
from DungeonGenerator import create_dungeon_builders, split_dungeon_builder, simple_dungeon_builder, default_dungeon_entrances
from DungeonGenerator import dungeon_portals, dungeon_drops, connect_doors, count_reserved_locations

View File

@@ -860,7 +860,7 @@ class ExplorationState(object):
self.crystal = exp_door.crystal
return exp_door
def visit_region(self, region, key_region=None, key_checks=False, bk_Flag=False):
def visit_region(self, region, key_region=None, key_checks=False, bk_flag=False):
if region.type != RegionType.Dungeon:
self.crystal = CrystalBarrier.Orange
if self.crystal == CrystalBarrier.Either:
@@ -881,7 +881,7 @@ class ExplorationState(object):
self.ttl_locations += 1
if location not in self.found_locations:
self.found_locations.append(location)
if not bk_Flag and (not location.forced_item or 'Big Key' in location.item.name):
if not bk_flag and (not location.forced_item or 'Big Key' in location.item.name):
self.bk_found.add(location)
if location.name in dungeon_events and location.name not in self.events:
if self.flooded_key_check(location):

View File

@@ -1445,7 +1445,7 @@ def validate_bk_layout(proposal, builder, start_regions, world, player):
if loc.forced_big_key():
return True
else:
return len(state.bk_found) > 0
return state.count_locations_exclude_specials(world, player) > 0
return False