SOURCE / PINNED RELEASE
Made of little things.
Outbreak: Soycoon City
- Release
- db7750b1d009…
- Author-recorded commit
- 3ee3f5fd27a6…
- License
- LICENSE
- Author’s source reference
- nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-b87c04571a9
Archive hash verified: dbebdc772b142a1c…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
import { readFile, writeFile } from 'node:fs/promises';
import { createHash } from 'node:crypto';
import { gameModule } from './game-module.mjs';
const path = process.argv[2];
if (!path?.startsWith('levels/') || !path.endsWith('.json') || path.includes('..')) throw new Error('Use: pnpm level:stamp levels/demo.json, after reviewing regenerated art.');
const { parseStage, signature } = await gameModule('../src/world.ts');
const level = parseStage(await readFile(path, 'utf8'));
for (const asset of level.assets ?? []) {
if (!asset.path) throw new Error('Repository assets need file paths.');
const bytes = await readFile(asset.path); asset.size = bytes.length; asset.sha256 = createHash('sha256').update(bytes).digest('hex');
}
for (const room of level.rooms) for (const camera of room.cameras) if (camera.background) camera.background.signature = signature(room, camera);
await writeFile(path, JSON.stringify(level, null, 2) + '\n');
console.log(`Stamped ${path}. Review and commit JSON and linked files together.`);
