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, SyntaxKind.ObjectInitializerExpression,
SeparatedList<ExpressionSyntax>( SeparatedList<ExpressionSyntax>(
SyntaxNodeList( SyntaxNodeList(
Assignment(nameof(QuestRoot.Author), quest.Author, null) AssignmentList(nameof(QuestRoot.Author), quest.Author)
.AsSyntaxNodeOrToken(),
AssignmentList(nameof(QuestRoot.Contributors), quest.Contributors)
.AsSyntaxNodeOrToken(), .AsSyntaxNodeOrToken(),
Assignment(nameof(QuestRoot.Comment), quest.Comment, null) Assignment(nameof(QuestRoot.Comment), quest.Comment, null)
.AsSyntaxNodeOrToken(), .AsSyntaxNodeOrToken(),

View File

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

View File

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

View File

@ -12,6 +12,7 @@
"Y": -3.7126513, "Y": -3.7126513,
"Z": 209.76575 "Z": 209.76575
}, },
"StopDistance": 5,
"TerritoryId": 152, "TerritoryId": 152,
"InteractionType": "AcceptQuest", "InteractionType": "AcceptQuest",
"AetheryteShortcut": "East Shroud - Hawthorne Hut", "AetheryteShortcut": "East Shroud - Hawthorne Hut",
@ -48,9 +49,9 @@
"TerritoryId": 152, "TerritoryId": 152,
"InteractionType": "Combat", "InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies", "EnemySpawnType": "OverworldEnemies",
"KillEnemyDataIds": [ "ComplexCombatData": [
179 {
], "DataId": 179,
"CompletionQuestVariablesFlags": [ "CompletionQuestVariablesFlags": [
16, 16,
1, 1,
@ -59,6 +60,17 @@
null, null,
null null
], ],
"MinimumKillCount": 1
}
],
"CompletionQuestVariablesFlags": [
null,
1,
null,
null,
null,
null
],
"$": "0 0 0 0 0 0 -> 16 1 0 0 0 0" "$": "0 0 0 0 0 0 -> 16 1 0 0 0 0"
}, },
{ {
@ -71,9 +83,9 @@
"TerritoryId": 152, "TerritoryId": 152,
"InteractionType": "Interact", "InteractionType": "Interact",
"CompletionQuestVariablesFlags": [ "CompletionQuestVariablesFlags": [
1,
null, null,
16, null,
null,
null, null,
null, null,
32 32
@ -90,9 +102,9 @@
"TerritoryId": 152, "TerritoryId": 152,
"InteractionType": "Interact", "InteractionType": "Interact",
"CompletionQuestVariablesFlags": [ "CompletionQuestVariablesFlags": [
1,
null, null,
16, null,
null,
null, null,
null, null,
64 64
@ -108,6 +120,14 @@
}, },
"TerritoryId": 152, "TerritoryId": 152,
"InteractionType": "Interact", "InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
],
"$": "18 1 32 0 0 96 -> 35 1 48 0 0 224" "$": "18 1 32 0 0 96 -> 35 1 48 0 0 224"
}, },
{ {
@ -119,9 +139,29 @@
"TerritoryId": 152, "TerritoryId": 152,
"InteractionType": "Combat", "InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies", "EnemySpawnType": "OverworldEnemies",
"KillEnemyDataIds": [ "ComplexCombatData": [
7 {
] "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, "StopDistance": 7,
"TerritoryId": 129, "TerritoryId": 129,
"InteractionType": "Interact", "InteractionType": "Interact",
"TargetTerritoryId": 138, "TargetTerritoryId": 138
"DialogueChoices": [
{
"Type": "List",
"ExcelSheet": "Warp",
"Prompt": null,
"Answer": 131109
}
]
}, },
{ {
"DataId": 1003393, "DataId": 1003393,

View File

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

View File

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

View File

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

View File

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

View File

@ -32,19 +32,42 @@
"Z": -130.11371 "Z": -130.11371
}, },
"TerritoryId": 153, "TerritoryId": 153,
"InteractionType": "Combat", "InteractionType": "Interact",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
55
],
"$": "0 0 0 0 0 0 -> 16 0 16 0 0 128", "$": "0 0 0 0 0 0 -> 16 0 16 0 0 128",
"CompletionQuestVariablesFlags": [ "CompletionQuestVariablesFlags": [
16,
null, null,
16, null,
null,
null, null,
null, null,
128 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, "TerritoryId": 153,
"InteractionType": "Interact", "InteractionType": "Interact",
"$": "16 0 16 0 0 128 -> 32 1 16 0 0 136", "$": "16 0 16 0 0 128 -> 32 1 16 0 0 136",
"DisableNavmesh": true,
"CompletionQuestVariablesFlags": [ "CompletionQuestVariablesFlags": [
16, null,
1, null,
null, null,
null, null,
null, null,
8 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, "DataId": 2001951,
"Position": { "Position": {
@ -75,7 +125,50 @@
}, },
"TerritoryId": 153, "TerritoryId": 153,
"InteractionType": "Interact", "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, "DataId": 2001952,
@ -84,9 +177,18 @@
"Y": 7.614197, "Y": 7.614197,
"Z": -43.137268 "Z": -43.137268
}, },
"StopDistance": 6,
"TerritoryId": 153, "TerritoryId": 153,
"InteractionType": "Interact", "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, "DataId": 2001950,
@ -96,19 +198,33 @@
"Z": -32.333923 "Z": -32.333923
}, },
"TerritoryId": 153, "TerritoryId": 153,
"InteractionType": "Combat", "InteractionType": "Interact",
"EnemySpawnType": "AfterInteraction", "$": "65 17 16 0 0 184 -> ",
"KillEnemyDataIds": [ "CompletionQuestVariablesFlags": [
64, null,
61 null,
], null,
"$": "65 17 16 0 0 184 -> " null,
null,
64
]
} }
] ]
}, },
{ {
"Sequence": 255, "Sequence": 255,
"Steps": [ "Steps": [
{
"Position": {
"X": 51.85704,
"Y": 2.712612,
"Z": -42.67677
},
"TerritoryId": 153,
"InteractionType": "WalkTo",
"DisableNavmesh": true,
"Mount": false
},
{ {
"DataId": 1000590, "DataId": 1000590,
"Position": { "Position": {
@ -117,7 +233,8 @@
"Z": -81.34589 "Z": -81.34589
}, },
"TerritoryId": 153, "TerritoryId": 153,
"InteractionType": "CompleteQuest" "InteractionType": "CompleteQuest",
"Mount": false
} }
] ]
} }

View File

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

View File

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

View File

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

View File

@ -11,10 +11,7 @@
}, },
"Author": { "Author": {
"description": "Author of the quest sequence", "description": "Author of the quest sequence",
"type": "string" "type": ["string", "array"],
},
"Contributors": {
"type": "array",
"items": { "items": {
"type": "string" "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.Collections.Generic;
using System.Text.Json.Serialization;
using Questionable.Model.V1.Converter;
namespace Questionable.Model.V1; namespace Questionable.Model.V1;
public sealed class QuestRoot public sealed class QuestRoot
{ {
public string Author { get; set; } = null!; [JsonConverter(typeof(StringListOrValueConverter))]
public List<string> Contributors { get; set; } = new(); public List<string> Author { get; set; } = new();
/// <summary> /// <summary>
/// This is only relevant for release builds. /// This is only relevant for release builds.