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:
@@ -126,15 +126,23 @@ foreach ($monster in $monsters) {
|
||||
-TargetPath (Join-Path $webImages "combat\sprites\$key-$($monster.spriteHeight).png") `
|
||||
-TargetWidth $monster.spriteHeight -Format 'png'
|
||||
|
||||
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'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 `
|
||||
-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.
|
||||
Copy-Item -Force (Join-Path $artEnemies 'PluendererhauptmannIcon.png') `
|
||||
(Join-Path $webImages 'combat\icons\raider-captain-128.png')
|
||||
Write-Host 'wrote raider-captain-128.png (hand-made)'
|
||||
# The Raider Captain has a hand-made icon. Authored art beats a generated
|
||||
# crop, but it still has to ship at icon size: resize the 1254x1254 source
|
||||
# down to 128x128 rather than copying it verbatim. It's already a square
|
||||
# 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') {
|
||||
$source = Join-Path $artBackgrounds "$background.png"
|
||||
|
||||
Reference in New Issue
Block a user