mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-22 07:35:37 -07:00
Compare commits
1 Commits
NewSoupVi-
...
core_spoil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa36271e02 |
@@ -1087,14 +1087,16 @@ class Spoiler:
|
|||||||
playthrough: Dict[str, Union[List[str], Dict[str, str]]] # sphere "0" is list, others are dict
|
playthrough: Dict[str, Union[List[str], Dict[str, str]]] # sphere "0" is list, others are dict
|
||||||
unreachables: Set[Location]
|
unreachables: Set[Location]
|
||||||
paths: Dict[str, List[Union[Tuple[str, str], Tuple[str, None]]]] # last step takes no further exits
|
paths: Dict[str, List[Union[Tuple[str, str], Tuple[str, None]]]] # last step takes no further exits
|
||||||
|
level: int
|
||||||
|
|
||||||
def __init__(self, multiworld: MultiWorld) -> None:
|
def __init__(self, multiworld: MultiWorld, level: int = 0) -> None:
|
||||||
self.multiworld = multiworld
|
self.multiworld = multiworld
|
||||||
self.hashes = {}
|
self.hashes = {}
|
||||||
self.entrances = {}
|
self.entrances = {}
|
||||||
self.playthrough = {}
|
self.playthrough = {}
|
||||||
self.unreachables = set()
|
self.unreachables = set()
|
||||||
self.paths = {}
|
self.paths = {}
|
||||||
|
self.level = level
|
||||||
|
|
||||||
def set_entrance(self, entrance: str, exit_: str, direction: str, player: int) -> None:
|
def set_entrance(self, entrance: str, exit_: str, direction: str, player: int) -> None:
|
||||||
if self.multiworld.players == 1:
|
if self.multiworld.players == 1:
|
||||||
@@ -1296,11 +1298,13 @@ class Spoiler:
|
|||||||
outfile.write('\n\nLocations:\n\n')
|
outfile.write('\n\nLocations:\n\n')
|
||||||
outfile.write('\n'.join(
|
outfile.write('\n'.join(
|
||||||
['%s: %s' % (location, item) for location, item in locations]))
|
['%s: %s' % (location, item) for location, item in locations]))
|
||||||
|
if self.level > 1:
|
||||||
outfile.write('\n\nPlaythrough:\n\n')
|
outfile.write('\n\nPlaythrough:\n\n')
|
||||||
outfile.write('\n'.join(['%s: {\n%s\n}' % (sphere_nr, '\n'.join(
|
outfile.write('\n'.join(['%s: {\n%s\n}' % (sphere_nr, '\n'.join(
|
||||||
[f" {location}: {item}" for (location, item) in sphere.items()] if isinstance(sphere, dict) else
|
[f" {location}: {item}" for (location, item) in sphere.items()] if isinstance(sphere, dict) else
|
||||||
[f" {item}" for item in sphere])) for (sphere_nr, sphere) in self.playthrough.items()]))
|
[f" {item}" for item in sphere])) for (sphere_nr, sphere) in self.playthrough.items()]))
|
||||||
|
else:
|
||||||
|
outfile.write('\n\nPlaythrough is disabled.\n\n')
|
||||||
if self.unreachables:
|
if self.unreachables:
|
||||||
outfile.write('\n\nUnreachable Items:\n\n')
|
outfile.write('\n\nUnreachable Items:\n\n')
|
||||||
outfile.write(
|
outfile.write(
|
||||||
|
|||||||
2
Main.py
2
Main.py
@@ -36,7 +36,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
|
|||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
world.set_seed(seed, args.race, str(args.outputname) if args.outputname else None)
|
world.set_seed(seed, args.race, str(args.outputname) if args.outputname else None)
|
||||||
world.plando_options = args.plando_options
|
world.plando_options = args.plando_options
|
||||||
|
world.spoiler.level = args.spoiler
|
||||||
world.shuffle = args.shuffle.copy()
|
world.shuffle = args.shuffle.copy()
|
||||||
world.logic = args.logic.copy()
|
world.logic = args.logic.copy()
|
||||||
world.mode = args.mode.copy()
|
world.mode = args.mode.copy()
|
||||||
|
|||||||
Reference in New Issue
Block a user