Include author name in quest tooltip
authorLiza Carvelli <liza@carvel.li>
Thu, 22 Aug 2024 16:39:50 +0000 (18:39 +0200)
committerLiza Carvelli <liza@carvel.li>
Thu, 22 Aug 2024 16:39:50 +0000 (18:39 +0200)
Questionable/Windows/QuestComponents/QuestTooltipComponent.cs

index 1f8a19a0f949d25d9baf24a678c76d55a86d6f3e..d181d45a82347111191de5a111bb2ea3a899258e 100644 (file)
@@ -62,7 +62,14 @@ internal sealed class QuestTooltipComponent
                 ImGui.TextUnformatted("Instant");
             }
 
-            if (!_questRegistry.IsKnownQuest(quest.QuestId))
+            if (_questRegistry.TryGetQuest(quest.QuestId, out Quest? knownQuest))
+            {
+                if (knownQuest.Root.Author.Count == 1)
+                    ImGui.Text($"Author: {knownQuest.Root.Author[0]}");
+                else
+                    ImGui.Text($"Authors: {string.Join(", ", knownQuest.Root.Author)}");
+            }
+            else
             {
                 ImGui.SameLine();
                 ImGui.TextUnformatted("NoQuestPath");