What happened?
multiworld.get_all_state() cannot be used to produce a valid 'all state' after Core AP's main fill has been run because get_all_state() collects all items from multiworld.itempool and all reachable placed items, which typically results in collecting every item into the 'all state' twice.
With default arguments, get_all_state() also collects items from each worlds' get_pre_fill_items(), which would generally be invalid to do after the pre_fill step because those items should be placed after the pre_fill step, so collecting items from each world's get_pre_fill_items() would often result in collecting those items a second time.
|
def stage_extend_hint_information(cls, multiworld: MultiWorld, hint_data: dict[int, dict[int, str]]) -> None: |
|
tunic_er_worlds: list[TunicWorld] = [world for world in multiworld.get_game_worlds("TUNIC") |
|
if world.options.entrance_rando] |
|
if not tunic_er_worlds: |
|
return |
|
|
|
hint_data.update({world.player: {} for world in tunic_er_worlds}) |
|
all_state = multiworld.get_all_state() |
multiworld.get_all_state():
|
ret = CollectionState(self, allow_partial_entrances) |
|
|
|
for item in self.itempool: |
|
self.worlds[item.player].collect(ret, item) |
|
if collect_pre_fill_items: |
|
for player in self.player_ids: |
|
subworld = self.worlds[player] |
|
for item in subworld.get_pre_fill_items(): |
|
subworld.collect(ret, item) |
|
if perform_sweep: |
|
ret.sweep_for_advancements() |
|
|
|
return ret |
What were the expected results?
The 'all state' that is constructed should only collect each Item instance at most once.
Software
Local generation
What happened?
multiworld.get_all_state()cannot be used to produce a valid 'all state' after Core AP's main fill has been run becauseget_all_state()collects all items frommultiworld.itempooland all reachable placed items, which typically results in collecting every item into the 'all state' twice.With default arguments,
get_all_state()also collects items from each worlds'get_pre_fill_items(), which would generally be invalid to do after thepre_fillstep because those items should be placed after thepre_fillstep, so collecting items from each world'sget_pre_fill_items()would often result in collecting those items a second time.Archipelago/worlds/tunic/__init__.py
Lines 676 to 683 in 6875f9d
multiworld.get_all_state():Archipelago/BaseClasses.py
Lines 452 to 464 in 6875f9d
What were the expected results?
The 'all state' that is constructed should only collect each Item instance at most once.
Software
Local generation