refactor and logging improvement

This commit is contained in:
Chomp 2022-01-14 10:16:37 +00:00
parent 9b78cd8654
commit d54d357961
2 changed files with 3 additions and 7 deletions

View File

@ -68,7 +68,7 @@ namespace GenerateQuestFile
if (originalQuest is null) 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; 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 // Iterate over quest objects a final time and add hard coded quest requirements if they dont already exist
foreach (var quest in questsToOutputToFile) foreach (var quest in questsToOutputToFile)
{ {
var questRequirements = QuestHelper.GetQuestDependancy(quest.Key); var questRequirements = QuestRequirements.GetQuestRequirements(quest.Key);
if (questRequirements is null || questRequirements.Count == 0) if (questRequirements is null || questRequirements.Count == 0)
{ {
LoggingHelpers.LogWarning($"Quest requirement not found for : {quest.Value.QuestName}, skipping.");
continue; continue;
} }

View File

@ -87,11 +87,6 @@ namespace AssortGenerator.Common.Helpers
return _assortUnlocks; return _assortUnlocks;
} }
public static List<QuestRequirements.PreRequisite> GetQuestDependancy(string questId)
{
return QuestRequirements.GetQuestRequirements(questId);
}
public static bool DoesIconExist(string iconPath, string imageId) public static bool DoesIconExist(string iconPath, string imageId)
{ {
var filesInPath = Directory.GetFiles(iconPath); var filesInPath = Directory.GetFiles(iconPath);