Suoni d'ambiente sintetizzati (vento, acqua, uccelli, grilli, campane) col loro volume in Pausa; la fessura in primo piano: si cerca col fascio della torcia il quadro e gli occhi (lavoro di Codex). La foto del palio leggibile da nginx, e un test che lo controlla per tutti i file serviti

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ks2K99uqCZjAxvy7Rdj1R
This commit is contained in:
2026-10-25 18:17:01 +01:00
co-authored by Claude Opus 5.5
parent 1fabb6e543
commit de303c5825
22 changed files with 732 additions and 61 deletions
+10
View File
@@ -81,6 +81,16 @@ async function giro(modo) {
const fermo = async passo => {
let ultima = null;
for (let i = 0; i < 600; i++) {
const search = await page.evaluate(() => {
const c = game.closeup;
if (c?.id !== 'fessura' || game.speech) return null;
return c.step === 'done' ? { done: true } : c.step === 'search' ? { at: game.story.closeups.fessura.targets[c.found].at } : null;
});
if (search?.done) await premi('#closeup-close');
else if (search?.at) {
const r = await page.locator('#scene').boundingBox(), [x, y] = search.at;
await tocca(r.x + x / 640 * r.width, r.y + y / 360 * r.height);
}
const s = await page.evaluate(() => ({ t: game.speech?.text ?? null, idle: !game.busy && !game.walking && !game.queue.length && !game.task }));
if (s.t && s.t !== ultima) { ultima = s.t; await page.waitForTimeout(60); await foto(`battuta-${s.t}`, passo); await page.evaluate(() => game.skip()); }
else if (!s.t && s.idle) return;
+10
View File
@@ -94,6 +94,16 @@ export async function run(d) {
if (await p.evaluate((t) => !!game.story.items[t], target)) await oggetto(target);
else await clicca(await centro(target));
await fermi(verb === "walk" ? 900 : 700);
if (await p.evaluate(() => game.closeup?.id === 'fessura')) {
for (let i = 0; i < 3; i++) {
const target = await p.evaluate(i => game.story.closeups.fessura.targets[i].at, i);
const [x, y] = await punto(...target);
d.vm(`DISPLAY=:0 ~/lab/video/mv.py ${x} ${y} 1.2`);
await p.waitForFunction(i => game.closeup?.found > i, i, { timeout: 60000 });
}
await d.click(p.locator('#closeup-close'), 0.6);
await fermi();
}
};
const passi = async (lista) => { for (const s of lista) await passo(s); };