Changes
This commit is contained in:
parent
e08a435894
commit
dc879a5ff4
@ -33,6 +33,8 @@ namespace GenerateQuestFile
|
||||
|
||||
var mergedLiveData = QuestHelper.MergeLiveQuestFiles(liveQuestData);
|
||||
|
||||
OutputQuestRequirementsToConsole(mergedLiveData);
|
||||
|
||||
JsonWriter.WriteJson<QuestRoot>(mergedLiveData, "output", Directory.GetCurrentDirectory(), "mergedlivejson");
|
||||
|
||||
// Find the quests that are missing from the live file from existing quest data
|
||||
@ -151,6 +153,25 @@ namespace GenerateQuestFile
|
||||
JsonWriter.WriteJson(questsToOutputToFile, "output", Directory.GetCurrentDirectory(), "quests");
|
||||
}
|
||||
|
||||
private static void OutputQuestRequirementsToConsole(QuestRoot mergedLiveData)
|
||||
{
|
||||
var output = new List<string>();
|
||||
foreach (var quest in mergedLiveData.data)
|
||||
{
|
||||
var questConditions = quest.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._id)} needs {QuestHelper.GetQuestNameById(x)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// JsonWriter.WriteJson<QuestRoot>(output, "output", Directory.GetCurrentDirectory(), "questRequirements");
|
||||
}
|
||||
|
||||
private static int[] GetQuestStatus(QuestStatus status)
|
||||
{
|
||||
switch (status)
|
||||
|
@ -43,15 +43,20 @@ namespace AssortGenerator.Common.Helpers
|
||||
QuestRoot mergedResult = null;
|
||||
foreach (var liveQuestDataFile in liveQuestDataFiles)
|
||||
{
|
||||
if (mergedResult == null)
|
||||
{
|
||||
mergedResult = liveQuestDataFile;
|
||||
}
|
||||
// If null, use whole file
|
||||
mergedResult ??= liveQuestDataFile;
|
||||
|
||||
foreach (var quest in liveQuestDataFile.data)
|
||||
{
|
||||
if (mergedResult.data.Any(x => x._id == quest._id))
|
||||
// Already has quest
|
||||
var mergedExistingQuest = mergedResult.data.Find(x => x._id == quest._id);
|
||||
if (mergedExistingQuest != null)
|
||||
{
|
||||
// new quest has more avail for start conditions, use instead
|
||||
if (mergedExistingQuest.conditions.AvailableForStart.Count < quest.conditions.AvailableForStart.Count)
|
||||
{
|
||||
mergedExistingQuest = quest;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,8 @@ namespace QuestValidator.Common.Helpers
|
||||
{ Quest.GunsmithP3, GetQuestData(Quest.GunsmithP3)
|
||||
.AddPrerequisiteQuest(Quest.GunsmithP1, QuestStatus.Success) },
|
||||
{ Quest.GunsmithP4, GetQuestData(Quest.GunsmithP4)
|
||||
.AddPrerequisiteQuest(Quest.GunsmithP2, QuestStatus.Success) },
|
||||
.AddPrerequisiteQuest(Quest.GunsmithP2, QuestStatus.Success)
|
||||
.AddPrerequisiteQuest(Quest.GunsmithP3, QuestStatus.Success) },
|
||||
{ Quest.GunsmithP5, GetQuestData(Quest.GunsmithP5)
|
||||
.AddPrerequisiteQuest(Quest.GunsmithP4, QuestStatus.Success) },
|
||||
{ Quest.GunsmithP6, GetQuestData(Quest.GunsmithP6)
|
||||
@ -333,7 +334,6 @@ namespace QuestValidator.Common.Helpers
|
||||
{ Quest.Grenadier, GetQuestData(Quest.Grenadier)
|
||||
.AddPrerequisiteQuest(Quest.ShakingUpTeller, QuestStatus.Success) },
|
||||
{ Quest.DecontaminationService, GetQuestData(Quest.DecontaminationService)
|
||||
.AddPrerequisiteQuest(Quest.HealthCarePrivacyP5, QuestStatus.Success)
|
||||
.AddPrerequisiteQuest(Quest.PrivateClinic, QuestStatus.Success) },
|
||||
{ Quest.PeacekeepingMission, GetQuestData(Quest.PeacekeepingMission)
|
||||
.AddPrerequisiteQuest(Quest.LendLeaseP2, QuestStatus.Success) },
|
||||
@ -454,11 +454,7 @@ namespace QuestValidator.Common.Helpers
|
||||
{ Quest.ColleaguesP2, GetQuestData(Quest.ColleaguesP2)
|
||||
.AddPrerequisiteQuest(Quest.ColleaguesP1, QuestStatus.Success) },
|
||||
{ Quest.ColleaguesP3, GetQuestData(Quest.ColleaguesP3)
|
||||
// .AddPrerequisiteQuest(Quest.HuntsmanPathSadist, QuestStatus.Started) // TODO - what happens when player completes sadist?
|
||||
.AddPrerequisiteQuest(Quest.ColleaguesP2, QuestStatus.Success)
|
||||
.AddPrerequisiteQuest(Quest.RiggedGame, QuestStatus.Success)
|
||||
.AddPrerequisiteQuest(Quest.TheChemistryCloset, QuestStatus.Success)
|
||||
},
|
||||
.AddPrerequisiteQuest(Quest.HuntsmanPathSadist, QuestStatus.Started) },
|
||||
{ Quest.RiggedGame, GetQuestData(Quest.RiggedGame)
|
||||
.AddPrerequisiteQuest(Quest.Anesthesia, QuestStatus.Success) },
|
||||
{ Quest.TerraGroupEmployee, GetQuestData(Quest.TerraGroupEmployee)
|
||||
@ -592,6 +588,8 @@ namespace QuestValidator.Common.Helpers
|
||||
.AddPrerequisiteQuest(Quest.BroadcastPart2, QuestStatus.Success)},
|
||||
{ Quest.Debtor, GetQuestData(Quest.Debtor)
|
||||
.AddPrerequisiteQuest(Quest.Chumming, QuestStatus.Success)},
|
||||
{ Quest.BroadcastPart2, GetQuestData(Quest.BroadcastPart2)
|
||||
.AddPrerequisiteQuest(Quest.BroadcastPart1, QuestStatus.Success)},
|
||||
// { Quest.CeaseFire, GetQuestData(Quest.CeaseFire)
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)}, // NO DATA YET
|
||||
{ Quest.KingsOfTheRooftops, GetQuestData(Quest.KingsOfTheRooftops)
|
||||
@ -602,13 +600,12 @@ namespace QuestValidator.Common.Helpers
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)}, // NO DATA YET
|
||||
{ Quest.TheHuntsmanPathAdministrator, GetQuestData(Quest.TheHuntsmanPathAdministrator)
|
||||
.AddPrerequisiteQuest(Quest.HuntsmanPathWoodsCleaning, QuestStatus.Success) },
|
||||
{ Quest.GreenCorridor, GetQuestData(Quest.GreenCorridor)
|
||||
// { Quest.GreenCorridor, GetQuestData(Quest.GreenCorridor)
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)}, // NO DATA YET
|
||||
// { Quest.RevisionStreetsOfTarkov, GetQuestData(Quest.RevisionStreetsOfTarkov)
|
||||
.AddPrerequisiteQuest(Quest.RevisionStreetsOfTarkov, QuestStatus.Success)},
|
||||
{ Quest.RevisionStreetsOfTarkov, GetQuestData(Quest.RevisionStreetsOfTarkov)
|
||||
.AddPrerequisiteQuest(Quest.Revision, QuestStatus.Success) },
|
||||
{ Quest.Surveillance, GetQuestData(Quest.Surveillance)
|
||||
.AddPrerequisiteQuest(Quest.BroadcastPart2, QuestStatus.Success)
|
||||
.AddPrerequisiteQuest(Quest.CorporateSecrets, QuestStatus.Success)},
|
||||
.AddPrerequisiteQuest(Quest.BroadcastPart2, QuestStatus.Success) },
|
||||
// { Quest.NetworkProviderPart1, GetQuestData(Quest.NetworkProviderPart1)
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)}, // NO DATA YET
|
||||
// { Quest.NetworkProviderPart2, GetQuestData(Quest.NetworkProviderPart2)
|
||||
@ -649,8 +646,8 @@ namespace QuestValidator.Common.Helpers
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)},// NO DATA YET
|
||||
{ Quest.BroadcastPart4, GetQuestData(Quest.BroadcastPart4)
|
||||
.AddPrerequisiteQuest(Quest.BroadcastPart3, QuestStatus.Success)},
|
||||
// { Quest.RoadClosed, GetQuestData(Quest.RoadClosed)
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)},// NO DATA YET
|
||||
{ Quest.RoadClosed, GetQuestData(Quest.RoadClosed)
|
||||
.AddPrerequisiteQuest(Quest.SpaTourP7, QuestStatus.Success)},
|
||||
// { Quest.MakeAmends, GetQuestData(Quest.MakeAmends)
|
||||
// .AddPrerequisiteQuest(Quest., QuestStatus.Success)}// NO DATA YET
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user