1
0
forked from liza/Questionable

Minor cleanup for ARR part 2

This commit is contained in:
Liza 2024-07-19 16:31:38 +02:00
parent 49695219c9
commit eb69c24ef4
Signed by: liza
GPG Key ID: 7199F8D727D55F67
17 changed files with 333 additions and 119 deletions

View File

@ -222,9 +222,7 @@ public class QuestSourceGenerator : ISourceGenerator
SyntaxKind.ObjectInitializerExpression,
SeparatedList<ExpressionSyntax>(
SyntaxNodeList(
Assignment(nameof(QuestRoot.Author), quest.Author, null)
.AsSyntaxNodeOrToken(),
AssignmentList(nameof(QuestRoot.Contributors), quest.Contributors)
AssignmentList(nameof(QuestRoot.Author), quest.Author)
.AsSyntaxNodeOrToken(),
Assignment(nameof(QuestRoot.Comment), quest.Comment, null)
.AsSyntaxNodeOrToken(),

View File

@ -1,6 +1,6 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "liza, JerryWester",
"Author": ["liza", "JerryWester"],
"QuestSequence": [
{
"Sequence": 0,
@ -58,7 +58,6 @@
"Sequence": 255,
"Steps": [
{
"$": "TODO: Questionable doesn't seem to interact with this ferry skipper",
"DataId": 1001263,
"Position": {
"X": 181.41443,
@ -67,20 +66,7 @@
},
"TerritoryId": 133,
"InteractionType": "Interact",
"DialogueChoices": [
{
"Type": "List",
"ExcelSheet": "Warp",
"Prompt": "Null",
"Answer": "131077"
},
{
"Type": "YesNo",
"ExcelSheet": "Warp",
"Prompt": "Board the ferry to Sweetbloom Pier?",
"Yes": true
}
]
"TargetTerritoryId": 152
},
{
"TerritoryId": 152,

View File

@ -35,7 +35,7 @@
"InteractionType": "Emote",
"Emote": "dance",
"CompletionQuestVariablesFlags": [
1,
null,
null,
null,
null,
@ -54,7 +54,7 @@
"InteractionType": "Emote",
"Emote": "dance",
"CompletionQuestVariablesFlags": [
1,
null,
null,
null,
null,
@ -71,7 +71,15 @@
},
"TerritoryId": 152,
"InteractionType": "Emote",
"Emote": "dance"
"Emote": "dance",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
}
]
},

View File

@ -12,6 +12,7 @@
"Y": -3.7126513,
"Z": 209.76575
},
"StopDistance": 5,
"TerritoryId": 152,
"InteractionType": "AcceptQuest",
"AetheryteShortcut": "East Shroud - Hawthorne Hut",
@ -48,9 +49,9 @@
"TerritoryId": 152,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"KillEnemyDataIds": [
179
],
"ComplexCombatData": [
{
"DataId": 179,
"CompletionQuestVariablesFlags": [
16,
1,
@ -59,6 +60,17 @@
null,
null
],
"MinimumKillCount": 1
}
],
"CompletionQuestVariablesFlags": [
null,
1,
null,
null,
null,
null
],
"$": "0 0 0 0 0 0 -> 16 1 0 0 0 0"
},
{
@ -71,9 +83,9 @@
"TerritoryId": 152,
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
1,
null,
16,
null,
null,
null,
null,
32
@ -90,9 +102,9 @@
"TerritoryId": 152,
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
1,
null,
16,
null,
null,
null,
null,
64
@ -108,6 +120,14 @@
},
"TerritoryId": 152,
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
],
"$": "18 1 32 0 0 96 -> 35 1 48 0 0 224"
},
{
@ -119,9 +139,29 @@
"TerritoryId": 152,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"KillEnemyDataIds": [
7
]
"ComplexCombatData": [
{
"DataId": 7,
"CompletionQuestVariablesFlags": [
null,
16,
null,
null,
null,
null
],
"MinimumKillCount": 1
}
],
"CompletionQuestVariablesFlags": [
null,
16,
null,
null,
null,
null
],
"$": "If skipping the previous step: 34 17 32 0 0 96"
}
]
},

View File

@ -89,15 +89,7 @@
"StopDistance": 7,
"TerritoryId": 129,
"InteractionType": "Interact",
"TargetTerritoryId": 138,
"DialogueChoices": [
{
"Type": "List",
"ExcelSheet": "Warp",
"Prompt": null,
"Answer": 131109
}
]
"TargetTerritoryId": 138
},
{
"DataId": 1003393,

View File

@ -20,6 +20,17 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -422.68066,
"Y": -2.5542965,
"Z": 150.50304
},
"TerritoryId": 139,
"InteractionType": "WalkTo",
"DisableNavmesh": true,
"Comment": "Avoids swimming"
},
{
"Position": {
"X": -585.1562,
@ -43,6 +54,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": -422.68066,
"Y": -2.5542965,
"Z": 150.50304
},
"TerritoryId": 139,
"InteractionType": "WalkTo",
"Comment": "Avoids swimming"
},
{
"DataId": 1006193,
"Position": {

View File

@ -1,6 +1,9 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "JerryWester",
"TerritoryBlacklist": [
1039
],
"QuestSequence": [
{
"Sequence": 0,

View File

@ -12,6 +12,7 @@
"Y": 3.543561,
"Z": 283.71094
},
"StopDistance": 5,
"TerritoryId": 152,
"InteractionType": "AcceptQuest",
"AetheryteShortcut": "East Shroud - Hawthorne Hut",
@ -32,7 +33,15 @@
"Z": 279.92664
},
"TerritoryId": 152,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 1000557,
@ -43,7 +52,14 @@
},
"TerritoryId": 152,
"InteractionType": "Interact",
"$": "0 0 0 0 0 0 -> 17 0 0 0 0 128"
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 1000553,
@ -54,7 +70,14 @@
},
"TerritoryId": 152,
"InteractionType": "Interact",
"$": "17 0 0 0 0 128 -> 33 16 0 0 0 192"
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
}
]
},

View File

@ -17,14 +17,6 @@
"AetheryteShortcut": "East Shroud - Hawthorne Hut",
"SkipIf": [
"AetheryteShortcutIfInSameTerritory"
],
"CompletionQuestVariablesFlags": [
null,
16,
null,
null,
null,
null
]
}
]
@ -40,15 +32,7 @@
"Z": 283.4973
},
"TerritoryId": 152,
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
1,
null,
null,
null,
null
]
"InteractionType": "Interact"
}
]
},

View File

@ -35,7 +35,7 @@
"InteractionType": "Interact",
"$": "0 0 0 0 0 0 -> 1 0 0 0 0 128",
"CompletionQuestVariablesFlags": [
1,
null,
null,
null,
null,
@ -54,7 +54,7 @@
"InteractionType": "Interact",
"$": "1 0 0 0 0 128 -> 2 0 0 0 0 192",
"CompletionQuestVariablesFlags": [
1,
null,
null,
null,
null,
@ -74,7 +74,7 @@
"AetheryteShortcut": "East Shroud - Hawthorne Hut",
"$": "2 0 0 0 0 192 -> 3 0 0 0 0 224",
"CompletionQuestVariablesFlags": [
1,
null,
null,
null,
null,
@ -90,7 +90,15 @@
"Z": 286.9154
},
"TerritoryId": 152,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
16
]
}
]
},

View File

@ -32,19 +32,42 @@
"Z": -130.11371
},
"TerritoryId": 153,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
55
],
"InteractionType": "Interact",
"$": "0 0 0 0 0 0 -> 16 0 16 0 0 128",
"CompletionQuestVariablesFlags": [
16,
null,
16,
null,
null,
null,
null,
128
],
"Comment": "Enemy loses aggro by the next waypoint"
},
{
"Position": {
"X": -108.2742,
"Y": 5.6416674,
"Z": -80.21974
},
"StopDistance": 0.25,
"TerritoryId": 153,
"InteractionType": "Jump",
"JumpDestination": {
"Position": {
"X": -111.25065,
"Y": 8.312978,
"Z": -82.8167
},
"DelaySeconds": 0.25
},
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
-8
]
},
{
@ -57,15 +80,42 @@
"TerritoryId": 153,
"InteractionType": "Interact",
"$": "16 0 16 0 0 128 -> 32 1 16 0 0 136",
"DisableNavmesh": true,
"CompletionQuestVariablesFlags": [
16,
1,
null,
null,
null,
null,
null,
8
]
},
{
"Position": {
"X": -90.467575,
"Y": 3.3634722,
"Z": -27.515985
},
"StopDistance": 0.25,
"TerritoryId": 153,
"InteractionType": "Jump",
"JumpDestination": {
"Position": {
"X": -84.96217,
"Y": 6.1436205,
"Z": -23.793756
},
"DelaySeconds": 0.25
},
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
-32
]
},
{
"DataId": 2001951,
"Position": {
@ -75,7 +125,50 @@
},
"TerritoryId": 153,
"InteractionType": "Interact",
"$": "32 1 16 0 0 136 -> 49 1 16 0 0 168"
"$": "32 1 16 0 0 136 -> 49 1 16 0 0 168",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"Position": {
"X": -77.875786,
"Y": 3.9296143,
"Z": -27.107864
},
"TerritoryId": 153,
"InteractionType": "WalkTo",
"DisableNavmesh": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
-16
]
},
{
"Position": {
"X": 15.053005,
"Y": 3.8386261,
"Z": -40.758984
},
"TerritoryId": 153,
"InteractionType": "WalkTo",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
-16
]
},
{
"DataId": 2001952,
@ -84,9 +177,18 @@
"Y": 7.614197,
"Z": -43.137268
},
"StopDistance": 6,
"TerritoryId": 153,
"InteractionType": "Interact",
"$": "49 1 16 0 0 168 -> 65 17 16 0 0 184"
"$": "49 1 16 0 0 168 -> 65 17 16 0 0 184",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
16
]
},
{
"DataId": 2001950,
@ -96,19 +198,33 @@
"Z": -32.333923
},
"TerritoryId": 153,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
64,
61
],
"$": "65 17 16 0 0 184 -> "
"InteractionType": "Interact",
"$": "65 17 16 0 0 184 -> ",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 51.85704,
"Y": 2.712612,
"Z": -42.67677
},
"TerritoryId": 153,
"InteractionType": "WalkTo",
"DisableNavmesh": true,
"Mount": false
},
{
"DataId": 1000590,
"Position": {
@ -117,7 +233,8 @@
"Z": -81.34589
},
"TerritoryId": 153,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"Mount": false
}
]
}

View File

@ -24,6 +24,11 @@
{
"Sequence": 255,
"Steps": [
{
"TerritoryId": 153,
"InteractionType": "AttuneAetheryte",
"Aetheryte": "South Shroud - Camp Tranquil"
},
{
"DataId": 1000576,
"Position": {

View File

@ -30,6 +30,7 @@
"Y": 8.673417,
"Z": 187.67012
},
"StopDistance": 0.5,
"TerritoryId": 152,
"InteractionType": "Emote",
"Emote": "lookout"

View File

@ -54,14 +54,7 @@
},
"TerritoryId": 140,
"InteractionType": "Interact",
"DialogueChoices": [
{
"ExcelSheet": "Warp",
"Type": "YesNo",
"Yes": true,
"Prompt": 131088
}
]
"TargetTerritoryId": 212
}
]
},
@ -77,14 +70,7 @@
},
"TerritoryId": 212,
"InteractionType": "Interact",
"DialogueChoices": [
{
"ExcelSheet": "Warp",
"Type": "YesNo",
"Yes": true,
"Prompt": 131090
}
]
"TargetTerritoryId": 212
},
{
"DataId": 1006688,

View File

@ -11,10 +11,7 @@
},
"Author": {
"description": "Author of the quest sequence",
"type": "string"
},
"Contributors": {
"type": "array",
"type": ["string", "array"],
"items": {
"type": "string"
}

View File

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Questionable.Model.V1.Converter;
public sealed class StringListOrValueConverter : JsonConverter<List<string>>
{
public override List<string>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.String)
return [reader.GetString()!];
if (reader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
reader.Read();
List<string> value = [];
while (reader.TokenType != JsonTokenType.EndArray)
{
value.Add(reader.GetString()!);
reader.Read();
}
return value;
}
public override void Write(Utf8JsonWriter writer, List<string>? value, JsonSerializerOptions options)
{
if (value == null)
writer.WriteNullValue();
else if (value.Count == 1)
writer.WriteStringValue(value[0]);
else
{
writer.WriteStartArray();
foreach (var v in value)
writer.WriteStringValue(v);
writer.WriteEndArray();
}
}
}

View File

@ -1,11 +1,13 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Questionable.Model.V1.Converter;
namespace Questionable.Model.V1;
public sealed class QuestRoot
{
public string Author { get; set; } = null!;
public List<string> Contributors { get; set; } = new();
[JsonConverter(typeof(StringListOrValueConverter))]
public List<string> Author { get; set; } = new();
/// <summary>
/// This is only relevant for release builds.