Add dialogue portrait slots

This commit is contained in:
2026-06-18 03:38:45 +09:00
parent bdd38104f4
commit 2166ea51ef
7 changed files with 97 additions and 11 deletions

View File

@@ -1203,6 +1203,19 @@ function Check-Dialogue-Line($Line, [string]$Context) {
if ([string]::IsNullOrWhiteSpace([string](Get-Prop $Line "text" ""))) {
Fail "$Context has an empty dialogue text."
}
if (Has-Prop $Line "portrait") {
$portrait = Get-Prop $Line "portrait" ""
if ($portrait -is [System.Array] -or $portrait -is [System.Management.Automation.PSCustomObject]) {
Fail "$Context portrait must be a string resource path."
}
if ([string]::IsNullOrWhiteSpace([string]$portrait)) {
Fail "$Context has an empty portrait path."
}
$portraitText = [string]$portrait
if ($portraitText -notmatch '^res://.+\.(png|jpg|jpeg|webp)$') {
Fail "$Context portrait must be a res:// image path."
}
}
}
function Check-Post-Battle-Dialogue($Dialogue, [string]$ScenarioId) {