fixing random_npc when overriding ancestries

This commit is contained in:
evilchili 2023-12-16 10:57:52 -08:00
parent 9bb90f6147
commit 8fc99f0eb2

View File

@ -30,5 +30,5 @@ def load_ancestry_pack(module_name: str = "") -> ModuleType:
def random_npc(ancestries: list = []) -> NPC: def random_npc(ancestries: list = []) -> NPC:
if not ancestries: if not ancestries:
_, ancestries = load_ancestry_pack() ancestries = list(load_ancestry_pack()[1].values())
return random.choice(list(ancestries.values())).NPC() return random.choice(ancestries).NPC()