Icone a pixel per gli oggetti dell'inventario: squama, libro e chiave

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017egeN2amL84ErjfgQFtEDn
This commit is contained in:
2026-10-23 17:59:52 +02:00
co-authored by Claude Opus 5.5
parent 034b1b62e7
commit 891cb2bbb1
8 changed files with 28 additions and 6 deletions
+8
View File
@@ -212,3 +212,11 @@ test('si buttano solo gli oggetti che non servono', () => {
for (const [id, item] of Object.entries(story.items))
if (id !== 'libro') assert.ok(!item.droppable, `${id} serve alla storia: non deve potersi buttare`);
});
test('ogni oggetto ha la sua icona a pixel', () => {
for (const [id, item] of Object.entries(story.items)) {
assert.ok(item.icon?.src, `${id}: manca l'icona`);
const svg = readFileSync(new URL('../' + item.icon.src, import.meta.url), 'utf8');
assert.match(svg, /viewBox="0 0 16 16"/, `${id}: l'icona deve essere 16x16`);
}
});