From 6b24a08da58af816ddfd00b63bcac04440129c82 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 22 Aug 2024 18:39:50 +0200 Subject: [PATCH] Include author name in quest tooltip --- .../Windows/QuestComponents/QuestTooltipComponent.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs b/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs index 1f8a19a0..d181d45a 100644 --- a/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs +++ b/Questionable/Windows/QuestComponents/QuestTooltipComponent.cs @@ -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");