AutoWorld: Should no longer need to overwrite collect, collect_item should be used instead

AutoWorld: Now correctly automatically applies State.remove if collect_item is also correct
LttP: Make keys advancement items

This feels like it improved generation chance. Might not be the case.
This commit is contained in:
Fabian Dill
2021-08-10 09:47:28 +02:00
parent 9ec0680ce5
commit a532ceeb0a
8 changed files with 76 additions and 122 deletions

View File

@@ -67,11 +67,6 @@ def fill_dungeons_restrictive(world):
world.random.shuffle(locations)
all_state_base = world.get_all_state()
# with shuffled dungeon items they are distributed as part of the normal item pool
for item in world.get_items():
if (item.smallkey and world.keyshuffle[item.player]) or (item.bigkey and world.bigkeyshuffle[item.player]):
all_state_base.collect(item, True)
item.advancement = True
# sort in the order Big Key, Small Key, Other before placing dungeon items
sort_order = {"BigKey": 3, "SmallKey": 2}
dungeon_items.sort(key=lambda item: sort_order.get(item.type, 1))