Commit Graph

1 Commits

Author SHA1 Message Date
troytt af2671c14a fix(ground): resolve monster-drop ground sprites from padded .d2s item codes
Pipeline-built Items carry code as the 4-byte space-padded .d2s field
('dr3 '), so the codeToFlippyFile lookup missed and every drop fell through
to the inventory-size guess (2x2 -> invbox, the Horadric Cube). Picking the
item up rebuilt it via itemToUiInventoryItem, which is why re-dropping
looked correct. Normalize the code (trim, fall back to base.id) in both
resolveItemSpriteRect and resolveGroundItemSpriteRect.

Adds tests/ground-drop-sprite.test.ts: raw-drop sprite == post-pickup sprite
for 400 Act 1 Champ A rolls, and every droppable base with a baked flippy
resolves to it directly.
2026-09-24 12:30:30 +00:00