Describe the bug
The boat rows in the attacks panel (bottom-right) are supposed to show a small colored boat sprite next to the troop count. The icon slot renders empty in the current build, both for outgoing and incoming transport boats.
To Reproduce
- Start any game and build a port.
- Launch a transport boat to an enemy/wilderness target.
- Open the bottom-right attacks panel.
- The row shows troops + target name with no boat icon on the left.
Expected behavior
A colored boat sprite (tinted with the owner's territory color) appears on the left of the row, as it did before the canvas-removal migration.
Additional context
src/client/hud/SpriteLoader.ts defines loadAllSprites() to populate the spriteMap that getSpriteForUnit() reads from, but nothing in the repo calls it:
$ git grep "loadAllSprites" -- 'src/**'
src/client/hud/SpriteLoader.ts:42:export const loadAllSprites = ...
The only previous caller lived in
src/client/graphics/layers/StructureIconsLayer.ts, which was deleted in 53cf2d4 ("migrate away from canvas"). Since then spriteMap stays empty → getSpriteForUnit() returns null → getColoredSprite() throws
→ AttacksDisplay.getBoatSpriteDataURL() swallows the error and returns "".
A one-line fix is to invoke loadAllSprites() from
AttacksDisplay.init(), but a more central preload site (wherever client assets are warmed up at startup) might be cleaner ... happy to defer.
Discord: cool_clarky
Describe the bug
The boat rows in the attacks panel (bottom-right) are supposed to show a small colored boat sprite next to the troop count. The icon slot renders empty in the current build, both for outgoing and incoming transport boats.
To Reproduce
Expected behavior
A colored boat sprite (tinted with the owner's territory color) appears on the left of the row, as it did before the canvas-removal migration.
Additional context
src/client/hud/SpriteLoader.tsdefinesloadAllSprites()to populate thespriteMapthatgetSpriteForUnit()reads from, but nothing in the repo calls it:The only previous caller lived in
src/client/graphics/layers/StructureIconsLayer.ts, which was deleted in 53cf2d4 ("migrate away from canvas"). Since thenspriteMapstays empty →getSpriteForUnit()returns null →getColoredSprite()throws→
AttacksDisplay.getBoatSpriteDataURL()swallows the error and returns"".A one-line fix is to invoke
loadAllSprites()fromAttacksDisplay.init(), but a more central preload site (wherever client assets are warmed up at startup) might be cleaner ... happy to defer.Discord: cool_clarky