From 4c2639ee9166e96e7095354e11b6cf9d4e304ec2 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 12 Oct 2024 15:59:21 +0200 Subject: [PATCH] Make Comment field required for manual interactions --- .../Kojin/Story/2974_Under Wraps.json | 6 +++-- .../Ultima Thule/4354_Combat Evolved.json | 2 +- ...4_Put Your Plasma Where Your Mouth Is.json | 5 ++-- QuestPaths/quest-v1.json | 24 +++++++++++++++++++ Questionable/Controller/QuestRegistry.cs | 2 +- Questionable/Model/IQuestInfo.cs | 9 +++++++ 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Story/2974_Under Wraps.json b/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Story/2974_Under Wraps.json index 9da1c6c8..dd7b9ed1 100644 --- a/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Story/2974_Under Wraps.json +++ b/QuestPaths/4.x - Stormblood/Allied Societies/Kojin/Story/2974_Under Wraps.json @@ -53,7 +53,8 @@ }, "TerritoryId": 614, "InteractionType": "Snipe", - "Fly": true + "Fly": true, + "Comment": "Snipe Namazu" } ] }, @@ -69,7 +70,8 @@ }, "TerritoryId": 614, "InteractionType": "Snipe", - "Fly": true + "Fly": true, + "Comment": "Snipe Namazu" } ] }, diff --git a/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json b/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json index 752ec884..5b8449c0 100644 --- a/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json +++ b/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json @@ -51,7 +51,7 @@ }, "StopDistance": 0.5, "TerritoryId": 960, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Combat", "EnemySpawnType": "AutoOnEnterArea", "KillEnemyDataIds": [ 14044 diff --git a/QuestPaths/6.x - Endwalker/Side Quests/Garlemald/4234_Put Your Plasma Where Your Mouth Is.json b/QuestPaths/6.x - Endwalker/Side Quests/Garlemald/4234_Put Your Plasma Where Your Mouth Is.json index 86f42705..52b9b801 100644 --- a/QuestPaths/6.x - Endwalker/Side Quests/Garlemald/4234_Put Your Plasma Where Your Mouth Is.json +++ b/QuestPaths/6.x - Endwalker/Side Quests/Garlemald/4234_Put Your Plasma Where Your Mouth Is.json @@ -45,7 +45,8 @@ "Z": -296.37604 }, "TerritoryId": 958, - "InteractionType": "Interact" + "InteractionType": "Snipe", + "Comment": "Snipe Magitek Colossi" } ] }, @@ -60,7 +61,7 @@ "Z": -299.36682 }, "TerritoryId": 958, - "InteractionType": "Snipe" + "InteractionType": "Interact" } ] }, diff --git a/QuestPaths/quest-v1.json b/QuestPaths/quest-v1.json index 3fe60751..aa74871e 100644 --- a/QuestPaths/quest-v1.json +++ b/QuestPaths/quest-v1.json @@ -1275,6 +1275,30 @@ "ItemsToGather" ] } + }, + { + "if": { + "properties": { + "InteractionType": { + "anyOf": [ + { + "const": "WaitForManualProgress" + }, + { + "const": "Instruction" + }, + { + "const": "Snipe" + } + ] + } + } + }, + "then": { + "required": [ + "Comment" + ] + } } ] } diff --git a/Questionable/Controller/QuestRegistry.cs b/Questionable/Controller/QuestRegistry.cs index 724acaf4..c948abe2 100644 --- a/Questionable/Controller/QuestRegistry.cs +++ b/Questionable/Controller/QuestRegistry.cs @@ -144,7 +144,7 @@ internal sealed class QuestRegistry private void ValidateQuests() { - _questValidator.Validate(_quests.Values.Where(x => x.Source != Quest.ESource.Assembly)); + _questValidator.Validate(_quests.Values.Where(x => x.Source != Quest.ESource.Assembly).ToList()); } private void LoadQuestFromStream(string fileName, Stream stream, Quest.ESource source) diff --git a/Questionable/Model/IQuestInfo.cs b/Questionable/Model/IQuestInfo.cs index d2c0e386..143f6046 100644 --- a/Questionable/Model/IQuestInfo.cs +++ b/Questionable/Model/IQuestInfo.cs @@ -25,5 +25,14 @@ internal interface IQuestInfo public string SimplifiedName => Name .Replace(".", "", StringComparison.Ordinal) + .Replace("*", "", StringComparison.Ordinal) + .Replace("\"", "", StringComparison.Ordinal) + .Replace("/", "", StringComparison.Ordinal) + .Replace("\\", "", StringComparison.Ordinal) + .Replace("<", "", StringComparison.Ordinal) + .Replace(">", "", StringComparison.Ordinal) + .Replace("|", "", StringComparison.Ordinal) + .Replace(":", "", StringComparison.Ordinal) + .Replace("?", "", StringComparison.Ordinal) .TrimStart(SeIconChar.QuestSync.ToIconChar(), SeIconChar.QuestRepeatable.ToIconChar(), ' '); }