Core: generalize pre_fill item pool handling

This commit is contained in:
Fabian Dill
2022-02-13 23:02:18 +01:00
parent 34b9344084
commit d7d1d54a0b
5 changed files with 34 additions and 28 deletions

View File

@@ -215,6 +215,10 @@ class World(metaclass=AutoWorldRegister):
if item.advancement:
return item.name
# called to create all_state, return Items that are created during pre_fill
def get_pre_fill_items(self) -> List[Item]:
return []
# following methods should not need to be overridden.
def collect(self, state: CollectionState, item: Item) -> bool:
name = self.collect_item(state, item)
@@ -236,6 +240,7 @@ class World(metaclass=AutoWorldRegister):
self.world.itempool.append(self.create_item(self.get_filler_item_name()))
# any methods attached to this can be used as part of CollectionState,
# please use a prefix as all of them get clobbered together
class LogicMixin(metaclass=AutoLogicRegister):