From: Liza Carvelli Date: Thu, 22 Aug 2024 16:39:50 +0000 (+0200) Subject: Include author name in quest tooltip X-Git-Tag: v2.14~2 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=6b24a08da58af816ddfd00b63bcac04440129c82;p=Questionable.git Include author name in quest tooltip --- 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");