Andrea vero: camminata, parlato, prendere e di spalle dal foglio sprite
tools/slice_sprites.py da Manzolo Rush e tools/prepare_character.py, che allinea i fotogrammi sul busto e sui piedi; il motore sceglie il fotogramma da quello che Andrea sta facendo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -4,7 +4,7 @@ import { story } from '../src/story/story.js';
|
||||
import { solution } from '../src/story/solution.js';
|
||||
import { Game, VERBS } from '../src/engine/game.js';
|
||||
import { inside } from '../src/engine/geometry.js';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
import { settle } from './helpers.mjs';
|
||||
|
||||
const EFFECTS = ['say', 'walk', 'face', 'give', 'drop', 'set', 'unset', 'if', 'dialogue', 'node', 'endDialogue', 'go', 'end'];
|
||||
@@ -95,3 +95,13 @@ test('la soluzione si percorre tutta dall\'inizio alla fine', () => {
|
||||
assert.ok(g.state.flags.indizio_regolo);
|
||||
assert.ok(saves.at(-1).ended, 'la fine non è salvata');
|
||||
});
|
||||
|
||||
test('i fogli dei personaggi hanno tutti i fotogrammi e l\'immagine', () => {
|
||||
for (const [id, c] of Object.entries(story.characters)) {
|
||||
if (!c.sprite) continue;
|
||||
const url = new URL('../' + c.sprite, import.meta.url);
|
||||
const atlas = JSON.parse(readFileSync(url, 'utf8'));
|
||||
assert.ok(existsSync(new URL(atlas.image, url)), `${id}: manca ${atlas.image}`);
|
||||
for (const f of ['walk_1', 'walk_2', 'walk_3', 'walk_4', 'stand', 'talk', 'take', 'back']) assert.ok(atlas.frames[f], `${id}: manca ${f}`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user