From 82abbfa5359a2c64101c0253a70ab295238434fe Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Wed, 5 Feb 2025 01:21:28 +0100 Subject: [PATCH] WIP some IDE test --- GatheringPaths/GatheringPaths.csproj | 6 +- GatheringPaths/gatheringlocation-v1.json | 2 +- QuestPathGenerator/Utils.cs | 41 +- QuestPaths/QuestPaths.csproj | 6 +- QuestPaths/quest-v1.json | 40 +- Questionable.Model/AssemblyModelLoader.cs | 12 +- Questionable.Model/Questionable.Model.csproj | 22 +- Questionable.Model/common-aethernetshard.json | 151 +++++++ Questionable.Model/common-aetheryte.json | 114 +++++ Questionable.Model/common-classjob.json | 53 +++ .../common-completionflags.json | 59 +++ Questionable.Model/common-schema.json | 395 ------------------ Questionable.Model/common-vector3.json | 22 + .../Validators/JsonSchemaValidator.cs | 16 +- 14 files changed, 510 insertions(+), 429 deletions(-) create mode 100644 Questionable.Model/common-aethernetshard.json create mode 100644 Questionable.Model/common-aetheryte.json create mode 100644 Questionable.Model/common-classjob.json create mode 100644 Questionable.Model/common-completionflags.json delete mode 100644 Questionable.Model/common-schema.json create mode 100644 Questionable.Model/common-vector3.json diff --git a/GatheringPaths/GatheringPaths.csproj b/GatheringPaths/GatheringPaths.csproj index eca2d022..1581f5d1 100644 --- a/GatheringPaths/GatheringPaths.csproj +++ b/GatheringPaths/GatheringPaths.csproj @@ -23,7 +23,11 @@ Questionable.GatheringPaths.GatheringLocationSchema - + + + + + diff --git a/GatheringPaths/gatheringlocation-v1.json b/GatheringPaths/gatheringlocation-v1.json index beba3b18..dacb7ddc 100644 --- a/GatheringPaths/gatheringlocation-v1.json +++ b/GatheringPaths/gatheringlocation-v1.json @@ -55,7 +55,7 @@ "type": "object", "properties": { "Position": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json" }, "MinimumAngle": { "type": "number", diff --git a/QuestPathGenerator/Utils.cs b/QuestPathGenerator/Utils.cs index 4a08c9e0..de364558 100644 --- a/QuestPathGenerator/Utils.cs +++ b/QuestPathGenerator/Utils.cs @@ -16,14 +16,38 @@ public static class Utils { public static List RegisterSchemas(GeneratorExecutionContext context) { - var commonSchemaFile = context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "common-schema.json"); + var commonAethernetShardFile = + context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "common-aethernetshard.json"); + var commonAetheryteFile = + context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "common-aetheryte.json"); + var commonClassJobFile = + context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "common-classjob.json"); + var commonCompletionFlagsFile = + context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "common-completionflags.json"); + var commonVector3File = context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "common-vector3.json"); var gatheringSchemaFile = context.AdditionalFiles.SingleOrDefault(x => Path.GetFileName(x.Path) == "gatheringlocation-v1.json"); var questSchemaFile = context.AdditionalFiles.SingleOrDefault(x => Path.GetFileName(x.Path) == "quest-v1.json"); SchemaRegistry.Global.Register( - new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json"), - JsonSchema.FromText(commonSchemaFile.GetText()!.ToString())); + new Uri( + "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aethernetshard.json"), + JsonSchema.FromText(commonAethernetShardFile.GetText()!.ToString())); + SchemaRegistry.Global.Register( + new Uri( + "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json"), + JsonSchema.FromText(commonAetheryteFile.GetText()!.ToString())); + SchemaRegistry.Global.Register( + new Uri( + "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json"), + JsonSchema.FromText(commonClassJobFile.GetText()!.ToString())); + SchemaRegistry.Global.Register( + new Uri( + "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-completionflags.json"), + JsonSchema.FromText(commonCompletionFlagsFile.GetText()!.ToString())); + SchemaRegistry.Global.Register( + new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json"), + JsonSchema.FromText(commonVector3File.GetText()!.ToString())); if (gatheringSchemaFile != null) { @@ -40,7 +64,16 @@ public static class Utils JsonSchema.FromText(questSchemaFile.GetText()!.ToString())); } - List jsonSchemaFiles = [commonSchemaFile, gatheringSchemaFile, questSchemaFile]; + List jsonSchemaFiles = + [ + commonAethernetShardFile, + commonAetheryteFile, + commonClassJobFile, + commonCompletionFlagsFile, + commonVector3File, + gatheringSchemaFile, + questSchemaFile + ]; return jsonSchemaFiles.Where(x => x != null).Cast().ToList(); } diff --git a/QuestPaths/QuestPaths.csproj b/QuestPaths/QuestPaths.csproj index f0bd1b42..05bce7ac 100644 --- a/QuestPaths/QuestPaths.csproj +++ b/QuestPaths/QuestPaths.csproj @@ -24,7 +24,11 @@ - + + + + + diff --git a/QuestPaths/quest-v1.json b/QuestPaths/quest-v1.json index 2654e031..62ad5764 100644 --- a/QuestPaths/quest-v1.json +++ b/QuestPaths/quest-v1.json @@ -76,7 +76,7 @@ "exclusiveMinimum": 0 }, "Position": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json" }, "StopDistance": { "type": [ @@ -170,7 +170,7 @@ }, "AetheryteShortcut": { "description": "The Aetheryte to teleport to (before moving)", - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "AethernetShortcut": { "type": "array", @@ -178,7 +178,7 @@ "minItems": 2, "maxItems": 2, "items": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/AethernetShard" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aethernetshard.json" } }, "ItemId": { @@ -200,7 +200,7 @@ "type": "boolean" }, "CompletionQuestVariablesFlags": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/CompletionFlags" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-completionflags.json" }, "Flying": { "type": "string", @@ -270,16 +270,16 @@ } }, "AetheryteLocked": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "AetheryteUnlocked": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "NearPosition": { "type": "object", "properties": { "Position": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json" }, "MaximumDistance": { "type": "number" @@ -342,10 +342,10 @@ } }, "AetheryteLocked": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "AetheryteUnlocked": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "RequiredQuestVariablesNotMet": { "type": "boolean" @@ -354,7 +354,7 @@ "type": "object", "properties": { "Position": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json" }, "MaximumDistance": { "type": "number" @@ -383,10 +383,10 @@ "type": "boolean" }, "AetheryteLocked": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "AetheryteUnlocked": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" } }, "additionalProperties": false @@ -395,7 +395,7 @@ "additionalProperties": false }, "CompletionQuestVariablesFlags": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/CompletionFlags" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-completionflags.json" }, "RequiredQuestVariables": { "type": "array", @@ -439,14 +439,14 @@ "description": "Which class or job you are using whenever this step gets executed", "type": "array", "items": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/ClassJob" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json" } }, "RequiredQuestAcceptedJob": { "description": "Which class or job you were using when accepting this quest (e.g. for beast tribes)", "type": "array", "items": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/ClassJob" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json" } }, "DelaySecondsAtStart": { @@ -509,7 +509,7 @@ "then": { "properties": { "Aetheryte": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Aetheryte" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json" }, "DataId": { "type": "null" @@ -541,7 +541,7 @@ "then": { "properties": { "AethernetShard": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/AethernetShard" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aethernetshard.json" }, "DataId": { "type": "null" @@ -641,7 +641,7 @@ "type": "integer" }, "CompletionQuestVariablesFlags": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/CompletionFlags" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-completionflags.json" }, "IgnoreQuestMarker": { "type": "boolean" @@ -1054,7 +1054,7 @@ "type": "object", "properties": { "Position": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json" }, "StopDistance": { "type": [ @@ -1424,7 +1424,7 @@ "then": { "properties": { "TargetClass": { - "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/ClassJob" + "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json" } }, "required": [ diff --git a/Questionable.Model/AssemblyModelLoader.cs b/Questionable.Model/AssemblyModelLoader.cs index d167cb25..8e6aae2a 100644 --- a/Questionable.Model/AssemblyModelLoader.cs +++ b/Questionable.Model/AssemblyModelLoader.cs @@ -4,6 +4,14 @@ namespace Questionable.Model; public static class AssemblyModelLoader { - public static Stream CommonSchema => - typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonSchema")!; + public static Stream CommonAetheryte => + typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonAetheryte")!; + public static Stream CommonAethernetShard => + typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonAethernetShard")!; + public static Stream CommonClassJob => + typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonClassJob")!; + public static Stream CommonCompletionFlags => + typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonCompletionFlags")!; + public static Stream CommonVector3 => + typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonVector3")!; } diff --git a/Questionable.Model/Questionable.Model.csproj b/Questionable.Model/Questionable.Model.csproj index 62ae2a34..13afcd43 100644 --- a/Questionable.Model/Questionable.Model.csproj +++ b/Questionable.Model/Questionable.Model.csproj @@ -16,9 +16,25 @@ - - - Questionable.Model.CommonSchema + + + + + + + Questionable.Model.CommonAethernetShard + + + Questionable.Model.CommonAetheryte + + + Questionable.Model.CommonClassJob + + + Questionable.Model.CommonCompletionFlags + + + Questionable.Model.CommonVector3 diff --git a/Questionable.Model/common-aethernetshard.json b/Questionable.Model/common-aethernetshard.json new file mode 100644 index 00000000..d382d8fb --- /dev/null +++ b/Questionable.Model/common-aethernetshard.json @@ -0,0 +1,151 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-aethernetshard.json", + "type": "string", + "enum": [ + "[Gridania] Aetheryte Plaza", + "[Gridania] Archers' Guild", + "[Gridania] Leatherworkers' Guild & Shaded Bower", + "[Gridania] Lancers' Guild", + "[Gridania] Conjurers' Guild", + "[Gridania] Botanists' Guild", + "[Gridania] Mih Khetto's Amphitheatre", + "[Gridania] Blue Badger Gate (Central Shroud)", + "[Gridania] Yellow Serpent Gate (North Shroud)", + "[Gridania] White Wolf Gate (Central Shroud)", + "[Gridania] Airship Landing", + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] Adventurers' Guild", + "[Ul'dah] Thaumaturges' Guild", + "[Ul'dah] Gladiators' Guild", + "[Ul'dah] Miners' Guild", + "[Ul'dah] Weavers' Guild", + "[Ul'dah] Goldsmiths' Guild", + "[Ul'dah] Sapphire Avenue Exchange", + "[Ul'dah] Alchemists' Guild", + "[Ul'dah] Gate of the Sultana (Western Thanalan)", + "[Ul'dah] Gate of Nald (Central Thanalan)", + "[Ul'dah] Gate of Thal (Central Thanalan)", + "[Ul'dah] The Chamber of Rule", + "[Ul'dah] Airship Landing", + "[Limsa Lominsa] Aetheryte Plaza", + "[Limsa Lominsa] Arcanists' Guild", + "[Limsa Lominsa] Fishermens' Guild", + "[Limsa Lominsa] Hawkers' Alley", + "[Limsa Lominsa] The Aftcastle", + "[Limsa Lominsa] Culinarians' Guild", + "[Limsa Lominsa] Marauders' Guild", + "[Limsa Lominsa] Zephyr Gate (Middle La Noscea)", + "[Limsa Lominsa] Tempest Gate (Lower La Noscea)", + "[Limsa Lominsa] Airship Landing", + "[Gold Saucer] Aetheryte Plaza", + "[Gold Saucer] Entrance & Card Squares", + "[Gold Saucer] Wonder Square East", + "[Gold Saucer] Wonder Square West", + "[Gold Saucer] Event Square", + "[Gold Saucer] Cactpot Board", + "[Gold Saucer] Round Square", + "[Gold Saucer] Chocobo Square", + "[Gold Saucer] Minion Square", + "[Ishgard] Aetheryte Plaza", + "[Ishgard] The Forgotten Knight", + "[Ishgard] Skysteel Manufactory", + "[Ishgard] The Brume", + "[Ishgard] Athenaeum Astrologicum", + "[Ishgard] The Jeweled Crozier", + "[Ishgard] Saint Reymanaud's Cathedral", + "[Ishgard] The Tribunal", + "[Ishgard] The Last Vigil", + "[Ishgard] The Gates of Judgement (Coerthas Central Highlands)", + "[Ishgard] Firmament", + "[Firmament] The Mendicant's Court", + "[Firmament] The Mattock", + "[Firmament] The New Nest", + "[Firmament] Saint Roelle's Dais", + "[Firmament] Featherfall", + "[Firmament] Hoarfrost Hall", + "[Firmament] Western Risensong Quarter", + "[Firmament] Eastern Risensong Quarter", + "[Idyllshire] Aetheryte Plaza", + "[Idyllshire] West Idyllshire", + "[Idyllshire] Prologue Gate (Western Hinterlands)", + "[Idyllshire] Epilogue Gate (Eastern Hinterlands)", + "[Rhalgr's Reach] Aetheryte Plaza", + "[Rhalgr's Reach] Western Rhalgr's Reach", + "[Rhalgr's Reach] Northeastern Rhalgr's Reach", + "[Rhalgr's Reach] Fringes Gate", + "[Rhalgr's Reach] Peaks Gate", + "[Kugane] Aetheryte Plaza", + "[Kugane] Shiokaze Hostelry", + "[Kugane] Pier #1", + "[Kugane] Thavnairian Consulate", + "[Kugane] Kogane Dori Markets", + "[Kugane] Bokairo Inn", + "[Kugane] The Ruby Bazaar", + "[Kugane] Sekiseigumi Barracks", + "[Kugane] Rakuza District", + "[Kugane] The Ruby Price", + "[Kugane] Airship Landing", + "[Doman Enclave] Aetheryte Plaza", + "[Doman Enclave] The Northern Enclave", + "[Doman Enclave] The Southern Enclave", + "[Doman Enclave] Ferry Docks", + "[Doman Enclave] The One River", + "[Doman Enclave] Gangos", + "[Crystarium] Aetheryte Plaza", + "[Crystarium] Musica Universalis Markets", + "[Crystarium] Temenos Rookery", + "[Crystarium] The Dossal Gate", + "[Crystarium] The Pendants", + "[Crystarium] The Amaro Launch", + "[Crystarium] The Crystalline Mean", + "[Crystarium] The Cabinet of Curiosity", + "[Crystarium] Tessellation (Lakeland)", + "[Eulmore] Aetheryte Plaza", + "[Eulmore] Southeast Derelicts", + "[Eulmore] Nightsoil Pots", + "[Eulmore] The Glory Gate", + "[Eulmore] The Mainstay", + "[Eulmore] The Path to Glory (Kholusia)", + "[Old Sharlayan] Aetheryte Plaza", + "[Old Sharlayan] The Studium", + "[Old Sharlayan] The Baldesion Annex", + "[Old Sharlayan] The Rostra", + "[Old Sharlayan] The Leveilleur Estate", + "[Old Sharlayan] Journey's End", + "[Old Sharlayan] Scholar's Harbor", + "[Old Sharlayan] The Hall of Artifice (Labyrinthos)", + "[Radz-at-Han] Aetheryte Plaza", + "[Radz-at-Han] Meghaduta", + "[Radz-at-Han] Ruveydah Fibers", + "[Radz-at-Han] Airship Landing", + "[Radz-at-Han] Alzadaal's Peace", + "[Radz-at-Han] Hall of the Radiant Host", + "[Radz-at-Han] Mehryde's Meyhane", + "[Radz-at-Han] Kama", + "[Radz-at-Han] The High Crucible of Al-Kimiya", + "[Radz-at-Han] The Gate of First Sight (Thavnair)", + "[Tuliyollal] Aetheryte Plaza", + "[Tuliyollal] Dirigible Landing", + "[Tuliyollal] The Resplendent Quarter", + "[Tuliyollal] The For'ard Cabins", + "[Tuliyollal] Bayside Bevy Marketplace", + "[Tuliyollal] Vollok Shoonsa", + "[Tuliyollal] Wachumeqimeqi", + "[Tuliyollal] Brightploom Post", + "[Tuliyollal] Arch of the Dawn (Urqopacha)", + "[Tuliyollal] Arch of the Dawn (Kozama'uka)", + "[Tuliyollal] Ihuykatumu (Kozama'uka)", + "[Tuliyollal] Dirigible Landing (Yak T'el)", + "[Tuliyollal] Xak Tural Skygate (Shaaloani)", + "[Solution Nine] Aetheryte Plaza", + "[Solution Nine] Information Center", + "[Solution Nine] True Vue", + "[Solution Nine] Neon Stein", + "[Solution Nine] The Arcadion", + "[Solution Nine] Resolution", + "[Solution Nine] Nexus Arcade", + "[Solution Nine] Residential Sector", + "[Solution Nine] Scanning Port Nine (Heritage Found)" + ] +} diff --git a/Questionable.Model/common-aetheryte.json b/Questionable.Model/common-aetheryte.json new file mode 100644 index 00000000..513b2d0b --- /dev/null +++ b/Questionable.Model/common-aetheryte.json @@ -0,0 +1,114 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json", + "type": "string", + "enum": [ + "Gridania", + "Central Shroud - Bentbranch Meadows", + "East Shroud - Hawthorne Hut", + "South Shroud - Quarrymill", + "South Shroud - Camp Tranquil", + "North Shroud - Fallgourd Float", + "Ul'dah", + "Western Thanalan - Horizon", + "Central Thanalan - Black Brush Station", + "Eastern Thanalan - Camp Drybone", + "Southern Thanalan - Little Ala Mhigo", + "Southern Thanalan - Forgotten Springs", + "Northern Thanalan - Camp Bluefog", + "Northern Thanalan - Ceruleum Processing Plant", + "Limsa Lominsa", + "Middle La Noscea - Summerford Farms", + "Lower La Noscea - Moraby Drydocks", + "Eastern La Noscea - Costa Del Sol", + "Eastern La Noscea - Wineport", + "Western La Noscea - Swiftperch", + "Western La Noscea - Aleport", + "Upper La Noscea - Camp Bronze Lake", + "Outer La Noscea - Camp Overlook", + "Coerthas Central Highlands - Camp Dragonhead", + "Mor Dhona", + "Wolves' Den Pier", + "Gold Saucer", + "Ishgard", + "Idyllshire", + "Coerthas Western Highlands - Falcon's Nest", + "The Sea of Clouds - Camp Cloudtop", + "The Sea of Clouds - Ok' Zundu", + "Azys Lla - Helix", + "The Dravanian Forelands - Tailfeather", + "The Dravanian Forelands - Anyx Trine", + "The Churning Mists - Moghome", + "The Churning Mists - Zenith", + "Rhalgr's Reach", + "Fringes - Castrum Oriens", + "Fringes - Peering Stones", + "Peaks - Ala Gannha", + "Peaks - Ala Ghiri", + "Lochs - Porta Praetoria", + "Lochs - Ala Mhigan Quarter", + "Kugane", + "Ruby Sea - Tamamizu", + "Ruby Sea - Onokoro", + "Yanxia - Namai", + "Yanxia - House of the Fierce", + "Azim Steppe - Reunion", + "Azim Steppe - Dawn Throne", + "Azim Steppe - Dhoro Iloh", + "Doman Enclave", + "Crystarium", + "Eulmore", + "Lakeland - Fort Jobb", + "Lakeland - Ostall Imperative", + "Kholusia - Stilltide", + "Kholusia - Wright", + "Kholusia - Tomra", + "Amh Araeng - Mord Souq", + "Amh Araeng - Inn at Journey's Head", + "Amh Araeng - Twine", + "Rak'tika - Slitherbough", + "Rak'tika - Fanow", + "Il Mheg - Lydha Lran", + "Il Mheg - Pla Enni", + "Il Mheg - Wolekdorf", + "Tempest - Ondo Cups", + "Tempest - Macarenses Angle", + "Old Sharlayan", + "Radz-at-Han", + "Labyrinthos - Archeion", + "Labyrinthos - Sharlayan Hamlet", + "Labyrinthos - Aporia", + "Thavnair - Yedlihmad", + "Thavnair - Great Work", + "Thavnair - Palaka's Stand", + "Garlemald - Camp Broken Glass", + "Garlemald - Tertium", + "Mare Lamentorum - Sinus Lacrimarum", + "Mare Lamentorum - Bestways Burrow", + "Elpis - Anagnorisis", + "Elpis - Twelve Wonders", + "Elpis - Poieten Oikos", + "Ultima Thule - Reah Tahra", + "Ultima Thule - Abode of the Ea", + "Ultima Thule - Base Omicron", + "Tuliyollal", + "Solution Nine", + "Urqopacha - Wachunpelo", + "Urqopacha - Worlar's Echo", + "Kozama'uka - Ok'hanu", + "Kozama'uka - Many Fires", + "Kozama'uka - Earthenshire", + "Kozama'uka - Dock Poga", + "Yak T'el - Iq Br'aax", + "Yak T'el - Mamook", + "Shaaloani - Hhusatahwi", + "Shaaloani - Sheshenewezi Springs", + "Shaaloani - Mehwahhetsoan", + "Heritage Found - Yyasulani Station", + "Heritage Found - The Outskirts", + "Heritage Found - Electrope Strike", + "Living Memory - Leynode Mnemo", + "Living Memory - Leynode Pyro", + "Living Memory - Leynode Aero" + ] +} diff --git a/Questionable.Model/common-classjob.json b/Questionable.Model/common-classjob.json new file mode 100644 index 00000000..aa9fa7ee --- /dev/null +++ b/Questionable.Model/common-classjob.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json", + "type": "string", + "enum": [ + "Gladiator", + "Pugilist", + "Marauder", + "Lancer", + "Archer", + "Conjurer", + "Thaumaturge", + "Carpenter", + "Blacksmith", + "Armorer", + "Goldsmith", + "Leatherworker", + "Weaver", + "Alchemist", + "Culinarian", + "Miner", + "Botanist", + "Fisher", + "Paladin", + "Monk", + "Warrior", + "Dragoon", + "Bard", + "White Mage", + "Black Mage", + "Arcanist", + "Summoner", + "Scholar", + "Rogue", + "Ninja", + "Machinist", + "Dark Knight", + "Astrologian", + "Samurai", + "Red Mage", + "Blue Mage", + "Gunbreaker", + "Dancer", + "Reaper", + "Sage", + "Viper", + "Pictomancer", + "DoW", + "DoM", + "DoH", + "DoL" + ] +} diff --git a/Questionable.Model/common-completionflags.json b/Questionable.Model/common-completionflags.json new file mode 100644 index 00000000..eb77d70c --- /dev/null +++ b/Questionable.Model/common-completionflags.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-completionflags.json", + "type": "array", + "description": "Quest Variables that dictate whether or not this step is skipped: null is don't check, positive values need to be set, negative values need to be unset", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "High": { + "type": [ + "number", + "null" + ], + "minimum": 0, + "maximum": 15 + }, + "Low": { + "type": [ + "number", + "null" + ], + "minimum": 0, + "maximum": 15 + }, + "Negative": { + "type": "boolean" + }, + "Mode": { + "type": "string", + "enum": [ + "Bitwise", + "Exact" + ] + } + } + }, + { + "type": "number", + "enum": [ + 1, + 2, + 4, + 8, + 16, + 32, + 64, + 128 + ] + }, + { + "type": "null" + } + ] + }, + "minItems": 6, + "maxItems": 6 +} diff --git a/Questionable.Model/common-schema.json b/Questionable.Model/common-schema.json deleted file mode 100644 index b0cdeeec..00000000 --- a/Questionable.Model/common-schema.json +++ /dev/null @@ -1,395 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json", - "$defs": { - "Vector3": { - "type": "object", - "description": "Position to try reaching after the jump", - "properties": { - "X": { - "type": "number" - }, - "Y": { - "type": "number" - }, - "Z": { - "type": "number" - } - }, - "required": [ - "X", - "Y", - "Z" - ] - }, - "Aetheryte": { - "type": "string", - "enum": [ - "Gridania", - "Central Shroud - Bentbranch Meadows", - "East Shroud - Hawthorne Hut", - "South Shroud - Quarrymill", - "South Shroud - Camp Tranquil", - "North Shroud - Fallgourd Float", - "Ul'dah", - "Western Thanalan - Horizon", - "Central Thanalan - Black Brush Station", - "Eastern Thanalan - Camp Drybone", - "Southern Thanalan - Little Ala Mhigo", - "Southern Thanalan - Forgotten Springs", - "Northern Thanalan - Camp Bluefog", - "Northern Thanalan - Ceruleum Processing Plant", - "Limsa Lominsa", - "Middle La Noscea - Summerford Farms", - "Lower La Noscea - Moraby Drydocks", - "Eastern La Noscea - Costa Del Sol", - "Eastern La Noscea - Wineport", - "Western La Noscea - Swiftperch", - "Western La Noscea - Aleport", - "Upper La Noscea - Camp Bronze Lake", - "Outer La Noscea - Camp Overlook", - "Coerthas Central Highlands - Camp Dragonhead", - "Mor Dhona", - "Wolves' Den Pier", - "Gold Saucer", - "Ishgard", - "Idyllshire", - "Coerthas Western Highlands - Falcon's Nest", - "The Sea of Clouds - Camp Cloudtop", - "The Sea of Clouds - Ok' Zundu", - "Azys Lla - Helix", - "The Dravanian Forelands - Tailfeather", - "The Dravanian Forelands - Anyx Trine", - "The Churning Mists - Moghome", - "The Churning Mists - Zenith", - "Rhalgr's Reach", - "Fringes - Castrum Oriens", - "Fringes - Peering Stones", - "Peaks - Ala Gannha", - "Peaks - Ala Ghiri", - "Lochs - Porta Praetoria", - "Lochs - Ala Mhigan Quarter", - "Kugane", - "Ruby Sea - Tamamizu", - "Ruby Sea - Onokoro", - "Yanxia - Namai", - "Yanxia - House of the Fierce", - "Azim Steppe - Reunion", - "Azim Steppe - Dawn Throne", - "Azim Steppe - Dhoro Iloh", - "Doman Enclave", - "Crystarium", - "Eulmore", - "Lakeland - Fort Jobb", - "Lakeland - Ostall Imperative", - "Kholusia - Stilltide", - "Kholusia - Wright", - "Kholusia - Tomra", - "Amh Araeng - Mord Souq", - "Amh Araeng - Inn at Journey's Head", - "Amh Araeng - Twine", - "Rak'tika - Slitherbough", - "Rak'tika - Fanow", - "Il Mheg - Lydha Lran", - "Il Mheg - Pla Enni", - "Il Mheg - Wolekdorf", - "Tempest - Ondo Cups", - "Tempest - Macarenses Angle", - "Old Sharlayan", - "Radz-at-Han", - "Labyrinthos - Archeion", - "Labyrinthos - Sharlayan Hamlet", - "Labyrinthos - Aporia", - "Thavnair - Yedlihmad", - "Thavnair - Great Work", - "Thavnair - Palaka's Stand", - "Garlemald - Camp Broken Glass", - "Garlemald - Tertium", - "Mare Lamentorum - Sinus Lacrimarum", - "Mare Lamentorum - Bestways Burrow", - "Elpis - Anagnorisis", - "Elpis - Twelve Wonders", - "Elpis - Poieten Oikos", - "Ultima Thule - Reah Tahra", - "Ultima Thule - Abode of the Ea", - "Ultima Thule - Base Omicron", - "Tuliyollal", - "Solution Nine", - "Urqopacha - Wachunpelo", - "Urqopacha - Worlar's Echo", - "Kozama'uka - Ok'hanu", - "Kozama'uka - Many Fires", - "Kozama'uka - Earthenshire", - "Kozama'uka - Dock Poga", - "Yak T'el - Iq Br'aax", - "Yak T'el - Mamook", - "Shaaloani - Hhusatahwi", - "Shaaloani - Sheshenewezi Springs", - "Shaaloani - Mehwahhetsoan", - "Heritage Found - Yyasulani Station", - "Heritage Found - The Outskirts", - "Heritage Found - Electrope Strike", - "Living Memory - Leynode Mnemo", - "Living Memory - Leynode Pyro", - "Living Memory - Leynode Aero" - ] - }, - "AethernetShard": { - "type": "string", - "enum": [ - "[Gridania] Aetheryte Plaza", - "[Gridania] Archers' Guild", - "[Gridania] Leatherworkers' Guild & Shaded Bower", - "[Gridania] Lancers' Guild", - "[Gridania] Conjurers' Guild", - "[Gridania] Botanists' Guild", - "[Gridania] Mih Khetto's Amphitheatre", - "[Gridania] Blue Badger Gate (Central Shroud)", - "[Gridania] Yellow Serpent Gate (North Shroud)", - "[Gridania] White Wolf Gate (Central Shroud)", - "[Gridania] Airship Landing", - "[Ul'dah] Aetheryte Plaza", - "[Ul'dah] Adventurers' Guild", - "[Ul'dah] Thaumaturges' Guild", - "[Ul'dah] Gladiators' Guild", - "[Ul'dah] Miners' Guild", - "[Ul'dah] Weavers' Guild", - "[Ul'dah] Goldsmiths' Guild", - "[Ul'dah] Sapphire Avenue Exchange", - "[Ul'dah] Alchemists' Guild", - "[Ul'dah] Gate of the Sultana (Western Thanalan)", - "[Ul'dah] Gate of Nald (Central Thanalan)", - "[Ul'dah] Gate of Thal (Central Thanalan)", - "[Ul'dah] The Chamber of Rule", - "[Ul'dah] Airship Landing", - "[Limsa Lominsa] Aetheryte Plaza", - "[Limsa Lominsa] Arcanists' Guild", - "[Limsa Lominsa] Fishermens' Guild", - "[Limsa Lominsa] Hawkers' Alley", - "[Limsa Lominsa] The Aftcastle", - "[Limsa Lominsa] Culinarians' Guild", - "[Limsa Lominsa] Marauders' Guild", - "[Limsa Lominsa] Zephyr Gate (Middle La Noscea)", - "[Limsa Lominsa] Tempest Gate (Lower La Noscea)", - "[Limsa Lominsa] Airship Landing", - "[Gold Saucer] Aetheryte Plaza", - "[Gold Saucer] Entrance & Card Squares", - "[Gold Saucer] Wonder Square East", - "[Gold Saucer] Wonder Square West", - "[Gold Saucer] Event Square", - "[Gold Saucer] Cactpot Board", - "[Gold Saucer] Round Square", - "[Gold Saucer] Chocobo Square", - "[Gold Saucer] Minion Square", - "[Ishgard] Aetheryte Plaza", - "[Ishgard] The Forgotten Knight", - "[Ishgard] Skysteel Manufactory", - "[Ishgard] The Brume", - "[Ishgard] Athenaeum Astrologicum", - "[Ishgard] The Jeweled Crozier", - "[Ishgard] Saint Reymanaud's Cathedral", - "[Ishgard] The Tribunal", - "[Ishgard] The Last Vigil", - "[Ishgard] The Gates of Judgement (Coerthas Central Highlands)", - "[Ishgard] Firmament", - "[Firmament] The Mendicant's Court", - "[Firmament] The Mattock", - "[Firmament] The New Nest", - "[Firmament] Saint Roelle's Dais", - "[Firmament] Featherfall", - "[Firmament] Hoarfrost Hall", - "[Firmament] Western Risensong Quarter", - "[Firmament] Eastern Risensong Quarter", - "[Idyllshire] Aetheryte Plaza", - "[Idyllshire] West Idyllshire", - "[Idyllshire] Prologue Gate (Western Hinterlands)", - "[Idyllshire] Epilogue Gate (Eastern Hinterlands)", - "[Rhalgr's Reach] Aetheryte Plaza", - "[Rhalgr's Reach] Western Rhalgr's Reach", - "[Rhalgr's Reach] Northeastern Rhalgr's Reach", - "[Rhalgr's Reach] Fringes Gate", - "[Rhalgr's Reach] Peaks Gate", - "[Kugane] Aetheryte Plaza", - "[Kugane] Shiokaze Hostelry", - "[Kugane] Pier #1", - "[Kugane] Thavnairian Consulate", - "[Kugane] Kogane Dori Markets", - "[Kugane] Bokairo Inn", - "[Kugane] The Ruby Bazaar", - "[Kugane] Sekiseigumi Barracks", - "[Kugane] Rakuza District", - "[Kugane] The Ruby Price", - "[Kugane] Airship Landing", - "[Doman Enclave] Aetheryte Plaza", - "[Doman Enclave] The Northern Enclave", - "[Doman Enclave] The Southern Enclave", - "[Doman Enclave] Ferry Docks", - "[Doman Enclave] The One River", - "[Doman Enclave] Gangos", - "[Crystarium] Aetheryte Plaza", - "[Crystarium] Musica Universalis Markets", - "[Crystarium] Temenos Rookery", - "[Crystarium] The Dossal Gate", - "[Crystarium] The Pendants", - "[Crystarium] The Amaro Launch", - "[Crystarium] The Crystalline Mean", - "[Crystarium] The Cabinet of Curiosity", - "[Crystarium] Tessellation (Lakeland)", - "[Eulmore] Aetheryte Plaza", - "[Eulmore] Southeast Derelicts", - "[Eulmore] Nightsoil Pots", - "[Eulmore] The Glory Gate", - "[Eulmore] The Mainstay", - "[Eulmore] The Path to Glory (Kholusia)", - "[Old Sharlayan] Aetheryte Plaza", - "[Old Sharlayan] The Studium", - "[Old Sharlayan] The Baldesion Annex", - "[Old Sharlayan] The Rostra", - "[Old Sharlayan] The Leveilleur Estate", - "[Old Sharlayan] Journey's End", - "[Old Sharlayan] Scholar's Harbor", - "[Old Sharlayan] The Hall of Artifice (Labyrinthos)", - "[Radz-at-Han] Aetheryte Plaza", - "[Radz-at-Han] Meghaduta", - "[Radz-at-Han] Ruveydah Fibers", - "[Radz-at-Han] Airship Landing", - "[Radz-at-Han] Alzadaal's Peace", - "[Radz-at-Han] Hall of the Radiant Host", - "[Radz-at-Han] Mehryde's Meyhane", - "[Radz-at-Han] Kama", - "[Radz-at-Han] The High Crucible of Al-Kimiya", - "[Radz-at-Han] The Gate of First Sight (Thavnair)", - "[Tuliyollal] Aetheryte Plaza", - "[Tuliyollal] Dirigible Landing", - "[Tuliyollal] The Resplendent Quarter", - "[Tuliyollal] The For'ard Cabins", - "[Tuliyollal] Bayside Bevy Marketplace", - "[Tuliyollal] Vollok Shoonsa", - "[Tuliyollal] Wachumeqimeqi", - "[Tuliyollal] Brightploom Post", - "[Tuliyollal] Arch of the Dawn (Urqopacha)", - "[Tuliyollal] Arch of the Dawn (Kozama'uka)", - "[Tuliyollal] Ihuykatumu (Kozama'uka)", - "[Tuliyollal] Dirigible Landing (Yak T'el)", - "[Tuliyollal] Xak Tural Skygate (Shaaloani)", - "[Solution Nine] Aetheryte Plaza", - "[Solution Nine] Information Center", - "[Solution Nine] True Vue", - "[Solution Nine] Neon Stein", - "[Solution Nine] The Arcadion", - "[Solution Nine] Resolution", - "[Solution Nine] Nexus Arcade", - "[Solution Nine] Residential Sector", - "[Solution Nine] Scanning Port Nine (Heritage Found)" - ] - }, - "ClassJob": { - "type": "string", - "enum": [ - "Gladiator", - "Pugilist", - "Marauder", - "Lancer", - "Archer", - "Conjurer", - "Thaumaturge", - "Carpenter", - "Blacksmith", - "Armorer", - "Goldsmith", - "Leatherworker", - "Weaver", - "Alchemist", - "Culinarian", - "Miner", - "Botanist", - "Fisher", - "Paladin", - "Monk", - "Warrior", - "Dragoon", - "Bard", - "White Mage", - "Black Mage", - "Arcanist", - "Summoner", - "Scholar", - "Rogue", - "Ninja", - "Machinist", - "Dark Knight", - "Astrologian", - "Samurai", - "Red Mage", - "Blue Mage", - "Gunbreaker", - "Dancer", - "Reaper", - "Sage", - "Viper", - "Pictomancer", - "DoW", - "DoM", - "DoH", - "DoL" - ] - }, - "CompletionFlags": { - "type": "array", - "description": "Quest Variables that dictate whether or not this step is skipped: null is don't check, positive values need to be set, negative values need to be unset", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "High": { - "type": [ - "number", - "null" - ], - "minimum": 0, - "maximum": 15 - }, - "Low": { - "type": [ - "number", - "null" - ], - "minimum": 0, - "maximum": 15 - }, - "Negative": { - "type": "boolean" - }, - "Mode": { - "type": "string", - "enum": [ - "Bitwise", - "Exact" - ] - } - } - }, - { - "type": "number", - "enum": [ - 1, - 2, - 4, - 8, - 16, - 32, - 64, - 128 - ] - }, - { - "type": "null" - } - ] - }, - "minItems": 6, - "maxItems": 6 - } - } -} diff --git a/Questionable.Model/common-vector3.json b/Questionable.Model/common-vector3.json new file mode 100644 index 00000000..6d78c120 --- /dev/null +++ b/Questionable.Model/common-vector3.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json", + "type": "object", + "description": "Position in the world", + "properties": { + "X": { + "type": "number" + }, + "Y": { + "type": "number" + }, + "Z": { + "type": "number" + } + }, + "required": [ + "X", + "Y", + "Z" + ] +} diff --git a/Questionable/Validation/Validators/JsonSchemaValidator.cs b/Questionable/Validation/Validators/JsonSchemaValidator.cs index d6bb483d..4f752e33 100644 --- a/Questionable/Validation/Validators/JsonSchemaValidator.cs +++ b/Questionable/Validation/Validators/JsonSchemaValidator.cs @@ -17,8 +17,20 @@ internal sealed class JsonSchemaValidator : IQuestValidator public JsonSchemaValidator() { SchemaRegistry.Global.Register( - new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json"), - JsonSchema.FromStream(AssemblyModelLoader.CommonSchema).AsTask().Result); + new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aethernetshard.json"), + JsonSchema.FromStream(AssemblyModelLoader.CommonAethernetShard).AsTask().Result); + SchemaRegistry.Global.Register( + new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-aetheryte.json"), + JsonSchema.FromStream(AssemblyModelLoader.CommonAetheryte).AsTask().Result); + SchemaRegistry.Global.Register( + new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-classjob.json"), + JsonSchema.FromStream(AssemblyModelLoader.CommonClassJob).AsTask().Result); + SchemaRegistry.Global.Register( + new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-completionflags.json"), + JsonSchema.FromStream(AssemblyModelLoader.CommonCompletionFlags).AsTask().Result); + SchemaRegistry.Global.Register( + new Uri("https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-vector3.json"), + JsonSchema.FromStream(AssemblyModelLoader.CommonVector3).AsTask().Result); } public IEnumerable Validate(Quest quest)