From d54d35796166e47e5590063a9d961418f821cd20 Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 14 Jan 2022 10:16:37 +0000 Subject: [PATCH] refactor and logging improvement --- GenerateQuestFile/Program.cs | 5 +++-- QuestValidator.Common/Helpers/QuestHelper.cs | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/GenerateQuestFile/Program.cs b/GenerateQuestFile/Program.cs index 6395a69..a5164c3 100644 --- a/GenerateQuestFile/Program.cs +++ b/GenerateQuestFile/Program.cs @@ -68,7 +68,7 @@ namespace GenerateQuestFile if (originalQuest is null) { - LoggingHelpers.LogWarning($"Cant check for original start conditions. Unable to find original quest {quest.Key} {QuestHelper.GetQuestNameById(quest.Key)}. skipping."); + LoggingHelpers.LogWarning($"Cant check for original start conditions. Unable to find original quest {quest.Key} {QuestHelper.GetQuestNameById(quest.Key)}, skipping."); continue; } @@ -82,9 +82,10 @@ namespace GenerateQuestFile // Iterate over quest objects a final time and add hard coded quest requirements if they dont already exist foreach (var quest in questsToOutputToFile) { - var questRequirements = QuestHelper.GetQuestDependancy(quest.Key); + var questRequirements = QuestRequirements.GetQuestRequirements(quest.Key); if (questRequirements is null || questRequirements.Count == 0) { + LoggingHelpers.LogWarning($"Quest requirement not found for : {quest.Value.QuestName}, skipping."); continue; } diff --git a/QuestValidator.Common/Helpers/QuestHelper.cs b/QuestValidator.Common/Helpers/QuestHelper.cs index acef58f..dc30dc7 100644 --- a/QuestValidator.Common/Helpers/QuestHelper.cs +++ b/QuestValidator.Common/Helpers/QuestHelper.cs @@ -87,11 +87,6 @@ namespace AssortGenerator.Common.Helpers return _assortUnlocks; } - public static List GetQuestDependancy(string questId) - { - return QuestRequirements.GetQuestRequirements(questId); - } - public static bool DoesIconExist(string iconPath, string imageId) { var filesInPath = Directory.GetFiles(iconPath);