From 85b10706d97d2fcf0d62ce563120692bd2c1f8bd Mon Sep 17 00:00:00 2001 From: Sverre Nystad Date: Tue, 19 Sep 2023 00:18:17 +0200 Subject: [PATCH] Refactor: Change type of list_of_relations in NPCRelations --- src/npc_generation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/npc_generation.py b/src/npc_generation.py index 119134e..33063c0 100644 --- a/src/npc_generation.py +++ b/src/npc_generation.py @@ -88,10 +88,6 @@ class NPCPsychology: fears: list[str] interests: list[str] -@dataclass() -class NPCRelations: - """The relations for non-player characters (NPCs).""" - list_of_relations: list[str] @dataclass() class NPCRelation: @@ -100,6 +96,12 @@ class NPCRelation: attitude: float still_exist: bool + +@dataclass() +class NPCRelations: + """The relations for non-player characters (NPCs).""" + list_of_relations: list[NPCRelation] + @dataclass() class NPC: """Class for non-player characters (NPCs)."""