Debug stuff + update quest prereqs
This commit is contained in:
parent
5703eb52f1
commit
ae9a93426a
@ -33,15 +33,13 @@ namespace GenerateQuestFile
|
|||||||
|
|
||||||
var mergedLiveData = QuestHelper.MergeLiveQuestFiles(liveQuestData);
|
var mergedLiveData = QuestHelper.MergeLiveQuestFiles(liveQuestData);
|
||||||
|
|
||||||
OutputQuestRequirementsToConsole(mergedLiveData);
|
OutputQuestRequirementsToConsole(mergedLiveData.data);
|
||||||
|
|
||||||
JsonWriter.WriteJson<QuestRoot>(mergedLiveData, "output", Directory.GetCurrentDirectory(), "mergedlivejson");
|
JsonWriter.WriteJson<QuestRoot>(mergedLiveData, "output", Directory.GetCurrentDirectory(), "mergedlivejson");
|
||||||
|
|
||||||
// Find the quests that are missing from the live file from existing quest data
|
// Find the quests that are missing from the live file from existing quest data
|
||||||
var missingQuests = GetMissingQuestsNotInLiveFile(existingQuestData, mergedLiveData);
|
var missingQuests = GetMissingQuestsNotInLiveFile(existingQuestData, mergedLiveData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create a list of quests to output
|
// Create a list of quests to output
|
||||||
// Use all quests in live file
|
// Use all quests in live file
|
||||||
// Use quests from quests.json to fill in missing quests
|
// Use quests from quests.json to fill in missing quests
|
||||||
@ -149,14 +147,14 @@ namespace GenerateQuestFile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
OutputQuestRequirementsToConsole2(questsToOutputToFile);
|
||||||
JsonWriter.WriteJson(questsToOutputToFile, "output", Directory.GetCurrentDirectory(), "quests");
|
JsonWriter.WriteJson(questsToOutputToFile, "output", Directory.GetCurrentDirectory(), "quests");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OutputQuestRequirementsToConsole(QuestRoot mergedLiveData)
|
private static void OutputQuestRequirementsToConsole(List<Quest> quests)
|
||||||
{
|
{
|
||||||
var output = new List<string>();
|
var output = new List<string>();
|
||||||
foreach (var quest in mergedLiveData.data)
|
foreach (var quest in quests)
|
||||||
{
|
{
|
||||||
var questConditions = quest.conditions.AvailableForStart.Where(x => x._parent == "Quest");
|
var questConditions = quest.conditions.AvailableForStart.Where(x => x._parent == "Quest");
|
||||||
if (questConditions != null)
|
if (questConditions != null)
|
||||||
@ -172,6 +170,25 @@ namespace GenerateQuestFile
|
|||||||
// JsonWriter.WriteJson<QuestRoot>(output, "output", Directory.GetCurrentDirectory(), "questRequirements");
|
// JsonWriter.WriteJson<QuestRoot>(output, "output", Directory.GetCurrentDirectory(), "questRequirements");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void OutputQuestRequirementsToConsole2(Dictionary<string, Quest> quests)
|
||||||
|
{
|
||||||
|
var output = new List<string>();
|
||||||
|
foreach (var quest in quests)
|
||||||
|
{
|
||||||
|
var questConditions = quest.Value.conditions.AvailableForStart.Where(x => x._parent == "Quest");
|
||||||
|
if (questConditions != null)
|
||||||
|
{
|
||||||
|
foreach (var questCondition in questConditions)
|
||||||
|
{
|
||||||
|
var x = questCondition._props.target.ToString();
|
||||||
|
Console.WriteLine($"{QuestHelper.GetQuestNameById(quest.Value._id)} needs {QuestHelper.GetQuestNameById(x)}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// JsonWriter.WriteJson<QuestRoot>(output, "output", Directory.GetCurrentDirectory(), "questRequirements");
|
||||||
|
}
|
||||||
|
|
||||||
private static int[] GetQuestStatus(QuestStatus status)
|
private static int[] GetQuestStatus(QuestStatus status)
|
||||||
{
|
{
|
||||||
switch (status)
|
switch (status)
|
||||||
|
@ -642,8 +642,9 @@ namespace QuestValidator.Common.Helpers
|
|||||||
{ Quest.WorstJobInTheWorld, GetQuestData(Quest.WorstJobInTheWorld)
|
{ Quest.WorstJobInTheWorld, GetQuestData(Quest.WorstJobInTheWorld)
|
||||||
.AddPrerequisiteQuest(Quest.RevisionStreetsOfTarkov, QuestStatus.Success)
|
.AddPrerequisiteQuest(Quest.RevisionStreetsOfTarkov, QuestStatus.Success)
|
||||||
.AddPrerequisiteQuest(Quest.WetJobP5, QuestStatus.Success)},
|
.AddPrerequisiteQuest(Quest.WetJobP5, QuestStatus.Success)},
|
||||||
// { Quest.BestJobInTheWorld, GetQuestData(Quest.BestJobInTheWorld)
|
{ Quest.BestJobInTheWorld, GetQuestData(Quest.BestJobInTheWorld)
|
||||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)},// NO DATA YET
|
.AddPrerequisiteQuest(Quest.ThePunisherP6, QuestStatus.Success)
|
||||||
|
.AddPrerequisiteQuest(Quest.KingsOfTheRooftops, QuestStatus.Success)},
|
||||||
{ Quest.BroadcastPart4, GetQuestData(Quest.BroadcastPart4)
|
{ Quest.BroadcastPart4, GetQuestData(Quest.BroadcastPart4)
|
||||||
.AddPrerequisiteQuest(Quest.BroadcastPart3, QuestStatus.Success)},
|
.AddPrerequisiteQuest(Quest.BroadcastPart3, QuestStatus.Success)},
|
||||||
{ Quest.RoadClosed, GetQuestData(Quest.RoadClosed)
|
{ Quest.RoadClosed, GetQuestData(Quest.RoadClosed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user