Add dialogue portrait side placement

This commit is contained in:
2026-06-18 03:55:46 +09:00
parent b280632852
commit b8378d9144
8 changed files with 54 additions and 17 deletions

View File

@@ -101,6 +101,7 @@ $validSkillKinds = @("damage", "heal", "support")
$validSkillTargets = @("enemy", "ally", "self", "any")
$validSkillStats = @("atk", "def", "int", "agi")
$validSkillEffectTypes = @("stat_bonus")
$validDialogueSides = @("left", "right")
$validPortraitPathPattern = '^res://.+\.(png|jpg|jpeg|webp)$'
$knownFlagIds = New-Object System.Collections.Generic.HashSet[string]
$knownFlagValueKinds = @{}
@@ -1207,6 +1208,12 @@ function Check-Dialogue-Line($Line, [string]$Context) {
if (Has-Prop $Line "portrait") {
Check-Portrait-Path (Get-Prop $Line "portrait" "") "$Context portrait"
}
if (Has-Prop $Line "side") {
$side = ([string](Get-Prop $Line "side" "")).Trim().ToLowerInvariant()
if (-not $validDialogueSides.Contains($side)) {
Fail "$Context has unknown dialogue side: $side"
}
}
}
function Check-Portrait-Path($Portrait, [string]$Context) {