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 Token(SyntaxKind
.UShortKeyword)), .UShortKeyword)),
Token(SyntaxKind.CommaToken), Token(SyntaxKind.CommaToken),
IdentifierName("QuestData") IdentifierName("QuestRoot")
})))) }))))
.WithVariables( .WithVariables(
SingletonSeparatedList( SingletonSeparatedList(
@ -169,7 +169,7 @@ public class QuestSourceGenerator : ISourceGenerator
SyntaxKind SyntaxKind
.CommaToken), .CommaToken),
IdentifierName( IdentifierName(
"QuestData") "QuestRoot")
})))) }))))
.WithArgumentList( .WithArgumentList(
ArgumentList()) ArgumentList())

View File

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

View File

@ -37,13 +37,13 @@ internal sealed class QuestRegistry
#if RELEASE #if RELEASE
_logger.LogInformation("Loading quests from assembly"); _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() Quest quest = new()
{ {
QuestId = questId, QuestId = questId,
Name = string.Empty, Root = questRoot,
Data = questData, Info = _questData.GetQuestInfo(questId),
}; };
_quests[questId] = quest; _quests[questId] = quest;
} }