Skip loading unknown quests (e.g. for CN) shipped with the plugin

qitari
Liza 2024-09-28 15:47:48 +02:00
parent 22949d0e32
commit 619b5431d5
Signed by: liza
GPG Key ID: 7199F8D727D55F67
1 changed files with 17 additions and 10 deletions

View File

@ -91,6 +91,8 @@ internal sealed class QuestRegistry
_logger.LogInformation("Loading quests from assembly");
foreach ((ElementId questId, QuestRoot questRoot) in AssemblyQuestLoader.GetQuests())
{
try
{
var questInfo = _questData.GetQuestInfo(questId);
if (questInfo is LeveInfo leveInfo)
@ -104,6 +106,11 @@ internal sealed class QuestRegistry
};
_quests[quest.Id] = quest;
}
catch (Exception e)
{
_logger.LogWarning("Not loading unknown quest {QuestId} from assembly: {Message}", questId, e.Message);
}
}
_logger.LogInformation("Loaded {Count} quests from assembly", _quests.Count);
}