Add dialogue portrait slots
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user