Merge branch 'DoorPerf' of https://github.com/compiling/ALttPEntranceRandomizer into compiling-DoorPerf
This commit is contained in:
9
Main.py
9
Main.py
@@ -371,7 +371,6 @@ def copy_world(world):
|
||||
create_inverted_regions(ret, player)
|
||||
create_dungeon_regions(ret, player)
|
||||
create_shops(ret, player)
|
||||
create_doors(ret, player)
|
||||
create_rooms(ret, player)
|
||||
create_dungeons(ret, player)
|
||||
|
||||
@@ -418,6 +417,10 @@ def copy_world(world):
|
||||
ret.state.stale = {player: True for player in range(1, world.players + 1)}
|
||||
|
||||
ret.doors = world.doors
|
||||
for door in ret.doors:
|
||||
entrance = ret.check_for_entrance(door.name, door.player)
|
||||
if entrance is not None:
|
||||
entrance.door = door
|
||||
ret.paired_doors = world.paired_doors
|
||||
ret.rooms = world.rooms
|
||||
ret.inaccessible_regions = world.inaccessible_regions
|
||||
@@ -469,7 +472,6 @@ def create_playthrough(world):
|
||||
logging.getLogger('').debug(world.fish.translate("cli","cli","building.collection.spheres"))
|
||||
while sphere_candidates:
|
||||
state.sweep_for_events(key_only=True)
|
||||
state.sweep_for_crystal_access()
|
||||
|
||||
sphere = []
|
||||
# build up spheres of collection radius. Everything in each sphere is independent from each other in dependencies and only depends on lower spheres
|
||||
@@ -487,7 +489,7 @@ def create_playthrough(world):
|
||||
|
||||
logging.getLogger('').debug(world.fish.translate("cli","cli","building.calculating.spheres"), len(collection_spheres), len(sphere), len(prog_locations))
|
||||
if not sphere:
|
||||
logging.getLogger('').debug(world.fish.translate("cli","cli","cannot.reach.items"), [world.fish.translate("cli","cli","cannot.reach.item") % (location.item.name, location.item.player, location.name, location.player) for location in sphere_candidates])
|
||||
logging.getLogger('').error(world.fish.translate("cli","cli","cannot.reach.items"), [world.fish.translate("cli","cli","cannot.reach.item") % (location.item.name, location.item.player, location.name, location.player) for location in sphere_candidates])
|
||||
if any([world.accessibility[location.item.player] != 'none' for location in sphere_candidates]):
|
||||
raise RuntimeError(world.fish.translate("cli","cli","cannot.reach.progression"))
|
||||
else:
|
||||
@@ -531,7 +533,6 @@ def create_playthrough(world):
|
||||
collection_spheres = []
|
||||
while required_locations:
|
||||
state.sweep_for_events(key_only=True)
|
||||
state.sweep_for_crystal_access()
|
||||
|
||||
sphere = list(filter(lambda loc: state.can_reach(loc) and state.not_flooding_a_key(world, loc), required_locations))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user