From 8fc99f0eb2121d1725393630fcd0ff60612982d7 Mon Sep 17 00:00:00 2001 From: evilchili Date: Sat, 16 Dec 2023 10:57:52 -0800 Subject: [PATCH] fixing random_npc when overriding ancestries --- npc/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/__init__.py b/npc/__init__.py index 4605a64..3332bda 100644 --- a/npc/__init__.py +++ b/npc/__init__.py @@ -30,5 +30,5 @@ def load_ancestry_pack(module_name: str = "") -> ModuleType: def random_npc(ancestries: list = []) -> NPC: if not ancestries: - _, ancestries = load_ancestry_pack() - return random.choice(list(ancestries.values())).NPC() + ancestries = list(load_ancestry_pack()[1].values()) + return random.choice(ancestries).NPC()