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:
@@ -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`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user