Add camp talk supply claims
This commit is contained in:
@@ -106,6 +106,7 @@ $validSkillEffectTypes = @("stat_bonus", "damage_over_time", "action_lock")
|
||||
$validSkillAreaShapes = @("single", "diamond")
|
||||
$validDialogueSides = @("left", "right")
|
||||
$validCampConversationGroups = @("officer", "topic")
|
||||
$validCampConversationEffectTypes = @("grant_item")
|
||||
$validPortraitPathPattern = '^res://.+\.(png|jpg|jpeg|webp)$'
|
||||
$minimumPortraitDimension = 512
|
||||
$portraitImageInspectorReady = $false
|
||||
@@ -1769,6 +1770,28 @@ function Check-Camp-Conversations($Conversations, [string]$ScenarioId) {
|
||||
foreach ($conversationLine in @($conversationLines)) {
|
||||
Check-Dialogue-Line $conversationLine "Scenario $ScenarioId briefing camp_conversations $conversationId"
|
||||
}
|
||||
if (Has-Prop $conversation "effects") {
|
||||
$rawEffects = Get-Prop $conversation "effects" $null
|
||||
$effects = @($rawEffects)
|
||||
if ($null -eq $rawEffects -or $effects.Count -le 0) {
|
||||
Fail "Scenario $ScenarioId briefing camp_conversations $conversationId effects must be an array."
|
||||
}
|
||||
foreach ($effect in $effects) {
|
||||
if ($effect -is [string] -or $effect -is [System.Array]) {
|
||||
Fail "Scenario $ScenarioId briefing camp_conversations $conversationId has malformed effect."
|
||||
}
|
||||
$effectType = [string](Get-Prop $effect "type" "")
|
||||
if (-not $validCampConversationEffectTypes.Contains($effectType)) {
|
||||
Fail "Scenario $ScenarioId briefing camp_conversations $conversationId has unknown effect: $effectType"
|
||||
}
|
||||
if ($effectType -eq "grant_item") {
|
||||
Check-Event-Grant-Item $effect "Scenario $ScenarioId briefing camp_conversations $conversationId grant_item"
|
||||
}
|
||||
if ((Has-Prop $effect "text") -and [string]::IsNullOrWhiteSpace([string](Get-Prop $effect "text" ""))) {
|
||||
Fail "Scenario $ScenarioId briefing camp_conversations $conversationId effect text must not be empty."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user