mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
introduce World.topology_present, to indicate if any meaningful path information is available in the world
This commit is contained in:
2
Main.py
2
Main.py
@@ -676,7 +676,7 @@ def create_playthrough(world):
|
|||||||
for player in range(1, world.players + 1):
|
for player in range(1, world.players + 1):
|
||||||
world.spoiler.paths.update(
|
world.spoiler.paths.update(
|
||||||
{str(location): get_path(state, location.parent_region) for sphere in collection_spheres for location in
|
{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:
|
if player in world.alttp_player_ids:
|
||||||
for path in dict(world.spoiler.paths).values():
|
for path in dict(world.spoiler.paths).values():
|
||||||
if any(exit == 'Pyramid Fairy' for (_, exit) in path):
|
if any(exit == 'Pyramid Fairy' for (_, exit) in path):
|
||||||
|
@@ -28,6 +28,7 @@ class World(metaclass=AutoWorldRegister):
|
|||||||
world: MultiWorld
|
world: MultiWorld
|
||||||
player: int
|
player: int
|
||||||
options: dict = {}
|
options: dict = {}
|
||||||
|
topology_present: bool = False # indicate if world type has any meaningful layout/pathing
|
||||||
|
|
||||||
def __init__(self, world: MultiWorld, player: int):
|
def __init__(self, world: MultiWorld, player: int):
|
||||||
self.world = world
|
self.world = world
|
||||||
|
@@ -7,6 +7,8 @@ from .Options import alttp_options
|
|||||||
class ALTTPWorld(World):
|
class ALTTPWorld(World):
|
||||||
game: str = "A Link to the Past"
|
game: str = "A Link to the Past"
|
||||||
options = alttp_options
|
options = alttp_options
|
||||||
|
topology_present = True
|
||||||
|
|
||||||
def collect(self, state: CollectionState, item: Item) -> bool:
|
def collect(self, state: CollectionState, item: Item) -> bool:
|
||||||
if item.name.startswith('Progressive '):
|
if item.name.startswith('Progressive '):
|
||||||
if 'Sword' in item.name:
|
if 'Sword' in item.name:
|
||||||
|
@@ -12,7 +12,7 @@ client_version = (0, 4)
|
|||||||
class MinecraftWorld(World):
|
class MinecraftWorld(World):
|
||||||
game: str = "Minecraft"
|
game: str = "Minecraft"
|
||||||
options = minecraft_options
|
options = minecraft_options
|
||||||
|
topology_present = True
|
||||||
|
|
||||||
def _get_mc_data(self):
|
def _get_mc_data(self):
|
||||||
exits = ["Overworld Structure 1", "Overworld Structure 2", "Nether Structure 1", "Nether Structure 2",
|
exits = ["Overworld Structure 1", "Overworld Structure 2", "Nether Structure 1", "Nether Structure 2",
|
||||||
|
Reference in New Issue
Block a user