introduce World.topology_present, to indicate if any meaningful path information is available in the world
This commit is contained in:
		
							parent
							
								
									ffc00b7800
								
							
						
					
					
						commit
						172c1789a8
					
				
							
								
								
									
										2
									
								
								Main.py
								
								
								
								
							
							
						
						
									
										2
									
								
								Main.py
								
								
								
								
							|  | @ -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): | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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: | ||||
|  |  | |||
|  | @ -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", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue