introduce World.topology_present, to indicate if any meaningful path information is available in the world

This commit is contained in:
Fabian Dill 2021-07-08 11:07:41 +02:00
parent ffc00b7800
commit 172c1789a8
4 changed files with 5 additions and 2 deletions

View File

@ -676,7 +676,7 @@ def create_playthrough(world):
for player in range(1, world.players + 1):
world.spoiler.paths.update(
{str(location): get_path(state, location.parent_region) for sphere in collection_spheres for location in
sphere if location.player == player})
sphere if location.player == player and world.worlds[player].topology_present})
if player in world.alttp_player_ids:
for path in dict(world.spoiler.paths).values():
if any(exit == 'Pyramid Fairy' for (_, exit) in path):

View File

@ -28,6 +28,7 @@ class World(metaclass=AutoWorldRegister):
world: MultiWorld
player: int
options: dict = {}
topology_present: bool = False # indicate if world type has any meaningful layout/pathing
def __init__(self, world: MultiWorld, player: int):
self.world = world

View File

@ -7,6 +7,8 @@ from .Options import alttp_options
class ALTTPWorld(World):
game: str = "A Link to the Past"
options = alttp_options
topology_present = True
def collect(self, state: CollectionState, item: Item) -> bool:
if item.name.startswith('Progressive '):
if 'Sword' in item.name:

View File

@ -12,7 +12,7 @@ client_version = (0, 4)
class MinecraftWorld(World):
game: str = "Minecraft"
options = minecraft_options
topology_present = True
def _get_mc_data(self):
exits = ["Overworld Structure 1", "Overworld Structure 2", "Nether Structure 1", "Nether Structure 2",