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

@@ -1,6 +1,7 @@
import typing
def GetBeemizerItem(world, player, item):
def GetBeemizerItem(world, player: int, item):
item_name = item if isinstance(item, str) else item.name
if item_name not in trap_replaceable:
@@ -16,6 +17,7 @@ def GetBeemizerItem(world, player, item):
else:
return "Bee Trap" if isinstance(item, str) else world.create_item("Bee Trap", player)
# should be replaced with direct world.create_item(item) call in the future
def ItemFactory(items, player: int):
from worlds.alttp import ALTTPWorld
@@ -35,6 +37,7 @@ def ItemFactory(items, player: int):
return ret[0]
return ret
class ItemData(typing.NamedTuple):
advancement: bool
type: typing.Optional[str]