From 5ec05fc6d2152b3f2118f8fde04a5286a0d0eff3 Mon Sep 17 00:00:00 2001 From: evilchili Date: Sat, 2 Dec 2023 18:25:45 -0800 Subject: [PATCH] Rewrite! This is a full rewrite of the npc generator code to use the newly-refactored dnd-name-generator code --- npc/types.py | 10 ++++++++++ pyproject.toml | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/npc/types.py b/npc/types.py index 41239ba..5525f26 100644 --- a/npc/types.py +++ b/npc/types.py @@ -156,6 +156,16 @@ class NPC: def ancestry(self) -> str: return self.__class__.__name__ + @property + def names(self): + if not self._names: + self._names = next(self.name_generator.name(1)) + return self._names + + @property + def full_name(self): + return self.names.fullname + @property def is_noble(self) -> bool: return self._is_noble diff --git a/pyproject.toml b/pyproject.toml index 177085a..09dad8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,6 @@ authors = ["evilchili "] license = "The Unlicense" packages = [ { include = 'npc' }, - { include = 'language' }, ] [tool.poetry.dependencies] @@ -48,4 +47,3 @@ remove-unused-variables = true # remove unused variables [tool.poetry.scripts] npc = "npc.cli:app" -language-tool = "language.cli:app"