Add hat collection message

This commit is contained in:
Idrees Hassan
2026-01-21 22:36:12 -05:00
parent 3b2081943d
commit 130fae6e0c
10 changed files with 144 additions and 36 deletions

View File

@@ -124,7 +124,7 @@ function buildHatItemLayer(spriteSheet, hatId) {
if (hatId === HAT.NONE) {
return new Layer([], TAG.DEFAULT);
}
const hatIndex = Object.keys(HAT).indexOf(hatId) - 1;
const hatIndex = Object.values(HAT).indexOf(hatId) - 1;
let hatPixels = getLayerPixels(spriteSheet, hatIndex, HAT_WIDTH);
hatPixels = pad(hatPixels, 1, 1, 1, 1);
hatPixels = drawOutline(hatPixels, true);