fix(web): resize the Raider Captain icon to actual icon size

The hand-made captain icon was copied verbatim at its 1254x1254 authoring
resolution instead of being scaled down, shipping an 80x heavier PNG under
a -128 filename to every hunt card and combat surface showing the Captain.
Resize it to 128x128 like its siblings while keeping the authored
composition; also stop the loop from writing a throwaway cropped icon for
that key before the hand-made one overwrites it.
This commit is contained in:
Bastian Wagner
2026-08-23 12:09:55 +02:00
parent 06450a0d36
commit 2489b9308f
2 changed files with 15 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -126,15 +126,23 @@ foreach ($monster in $monsters) {
-TargetPath (Join-Path $webImages "combat\sprites\$key-$($monster.spriteHeight).png") ` -TargetPath (Join-Path $webImages "combat\sprites\$key-$($monster.spriteHeight).png") `
-TargetWidth $monster.spriteHeight -Format 'png' -TargetWidth $monster.spriteHeight -Format 'png'
Save-Icon -SourcePath $cutout ` # The Raider Captain's icon comes from hand-made art below, not a generated
-TargetPath (Join-Path $webImages "combat\icons\$key-128.png") ` # crop of the body art, so skip the crop step for that key here.
-CropX $monster.cropX -CropY $monster.cropY -CropSize $monster.cropSize if ($key -ne 'raider-captain') {
Save-Icon -SourcePath $cutout `
-TargetPath (Join-Path $webImages "combat\icons\$key-128.png") `
-CropX $monster.cropX -CropY $monster.cropY -CropSize $monster.cropSize
}
} }
# The Raider Captain has a hand-made icon. Authored art beats a crop. # The Raider Captain has a hand-made icon. Authored art beats a generated
Copy-Item -Force (Join-Path $artEnemies 'PluendererhauptmannIcon.png') ` # crop, but it still has to ship at icon size: resize the 1254x1254 source
(Join-Path $webImages 'combat\icons\raider-captain-128.png') # down to 128x128 rather than copying it verbatim. It's already a square
Write-Host 'wrote raider-captain-128.png (hand-made)' # portrait, so a straight bicubic resize preserves the authored composition
# with no re-cropping.
Save-Scaled -SourcePath (Join-Path $artEnemies 'PluendererhauptmannIcon.png') `
-TargetPath (Join-Path $webImages 'combat\icons\raider-captain-128.png') `
-TargetWidth 128 -Format 'png'
foreach ($background in 'Wachturm', 'Aschengrube') { foreach ($background in 'Wachturm', 'Aschengrube') {
$source = Join-Path $artBackgrounds "$background.png" $source = Join-Path $artBackgrounds "$background.png"