Include author name in quest tooltip

This commit is contained in:
Liza 2024-08-22 18:39:50 +02:00
parent 59302bb92b
commit 6b24a08da5
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -62,7 +62,14 @@ internal sealed class QuestTooltipComponent
ImGui.TextUnformatted("Instant"); 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.SameLine();
ImGui.TextUnformatted("NoQuestPath"); ImGui.TextUnformatted("NoQuestPath");