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:
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 29 KiB |
@@ -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'
|
||||||
|
|
||||||
|
# The Raider Captain's icon comes from hand-made art below, not a generated
|
||||||
|
# crop of the body art, so skip the crop step for that key here.
|
||||||
|
if ($key -ne 'raider-captain') {
|
||||||
Save-Icon -SourcePath $cutout `
|
Save-Icon -SourcePath $cutout `
|
||||||
-TargetPath (Join-Path $webImages "combat\icons\$key-128.png") `
|
-TargetPath (Join-Path $webImages "combat\icons\$key-128.png") `
|
||||||
-CropX $monster.cropX -CropY $monster.cropY -CropSize $monster.cropSize
|
-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"
|
||||||
|
|||||||
Reference in New Issue
Block a user