1
0
forked from liza/Questionable

Make Comment field required for manual interactions

This commit is contained in:
Liza 2024-10-12 15:59:21 +02:00
parent 11f901d60f
commit 4c2639ee91
Signed by: liza
GPG Key ID: 7199F8D727D55F67
6 changed files with 42 additions and 6 deletions

View File

@ -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"
}
]
},

View File

@ -51,7 +51,7 @@
},
"StopDistance": 0.5,
"TerritoryId": 960,
"InteractionType": "WaitForManualProgress",
"InteractionType": "Combat",
"EnemySpawnType": "AutoOnEnterArea",
"KillEnemyDataIds": [
14044

View File

@ -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"
}
]
},

View File

@ -1275,6 +1275,30 @@
"ItemsToGather"
]
}
},
{
"if": {
"properties": {
"InteractionType": {
"anyOf": [
{
"const": "WaitForManualProgress"
},
{
"const": "Instruction"
},
{
"const": "Snipe"
}
]
}
}
},
"then": {
"required": [
"Comment"
]
}
}
]
}

View File

@ -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)

View File

@ -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(), ' ');
}