diff --git a/BaseClasses.py b/BaseClasses.py index b03d24e5..9e2b657c 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1349,6 +1349,7 @@ class Spoiler: get_path(state, multiworld.get_region('Inverted Big Bomb Shop', player)) def to_file(self, filename: str) -> None: + from itertools import chain from worlds import AutoWorld def write_option(option_key: str, option_obj: Options.AssembleOptions) -> None: @@ -1385,6 +1386,14 @@ class Spoiler: AutoWorld.call_all(self.multiworld, "write_spoiler", outfile) + precollected_items = [f"{item.name} ({self.multiworld.get_player_name(item.player)})" + if self.multiworld.players > 1 + else item.name + for item in chain.from_iterable(self.multiworld.precollected_items.values())] + if precollected_items: + outfile.write("\n\nStarting Items:\n\n") + outfile.write("\n".join([item for item in precollected_items])) + locations = [(str(location), str(location.item) if location.item is not None else "Nothing") for location in self.multiworld.get_locations() if location.show_in_spoiler] outfile.write('\n\nLocations:\n\n')