Fix codegen

This commit is contained in:
Liza 2024-07-11 13:14:54 +02:00
parent 8c808c8fde
commit 8bd62a3b88
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 6 additions and 6 deletions

View File

@ -141,7 +141,7 @@ public class QuestSourceGenerator : ISourceGenerator
Token(SyntaxKind
.UShortKeyword)),
Token(SyntaxKind.CommaToken),
IdentifierName("QuestData")
IdentifierName("QuestRoot")
}))))
.WithVariables(
SingletonSeparatedList(
@ -169,7 +169,7 @@ public class QuestSourceGenerator : ISourceGenerator
SyntaxKind
.CommaToken),
IdentifierName(
"QuestData")
"QuestRoot")
}))))
.WithArgumentList(
ArgumentList())

View File

@ -6,6 +6,6 @@ namespace Questionable.QuestPaths;
public static partial class AssemblyQuestLoader
{
public static IReadOnlyDictionary<ushort, QuestData> GetQuests() => Quests;
public static IReadOnlyDictionary<ushort, QuestRoot> GetQuests() => Quests;
}
#endif

View File

@ -37,13 +37,13 @@ internal sealed class QuestRegistry
#if RELEASE
_logger.LogInformation("Loading quests from assembly");
foreach ((ushort questId, QuestData questData) in QuestPaths.AssemblyQuestLoader.GetQuests())
foreach ((ushort questId, QuestRoot questRoot) in QuestPaths.AssemblyQuestLoader.GetQuests())
{
Quest quest = new()
{
QuestId = questId,
Name = string.Empty,
Data = questData,
Root = questRoot,
Info = _questData.GetQuestInfo(questId),
};
_quests[questId] = quest;
}