forked from chomp/ChompQuestVerifier
Add quest icon checking
This commit is contained in:
parent
ce14ef879c
commit
70f5907630
@ -30,6 +30,8 @@ namespace QuestValidator
|
||||
|
||||
CheckForMissingQuestsInAkiFile(liveQuestData, questData);
|
||||
|
||||
CheckForMissingQuestIcons(questData);
|
||||
|
||||
foreach (var item in questData)
|
||||
{
|
||||
var quest = item.Value;
|
||||
@ -58,6 +60,25 @@ namespace QuestValidator
|
||||
}
|
||||
}
|
||||
|
||||
private static void CheckForMissingQuestIcons(Dictionary<string, Quest> questData)
|
||||
{
|
||||
string iconPath = "TODO add path here Server\\project\\assets\\images\\quests";
|
||||
|
||||
if (iconPath.Contains("TODO add path here"))
|
||||
{
|
||||
throw new Exception("Add the correct icon path to Program.cs");
|
||||
}
|
||||
|
||||
foreach (var quest in questData)
|
||||
{
|
||||
var imageId = quest.Value.image.Split("/")[4].Split(".")[0];
|
||||
if (!QuestHelper.DoesIconExist(iconPath, imageId))
|
||||
{
|
||||
LoggingHelpers.LogError($"ERROR - Quest {quest.Value.QuestName} is missing an icon file, add {imageId}.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void ListMissingQuestsInLive(Dictionary<string, Quest> questData, QuestRoot liveQuestData)
|
||||
{
|
||||
var missingQuests = new List<Quest>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user