12 lines
496 B
TypeScript
12 lines
496 B
TypeScript
import { writeFileSync } from 'node:fs';
|
|
import { resolve } from 'node:path';
|
|
import { WORLD_LOCATIONS, WORLD_ROUTE_EDGES } from '../src/business/world_npc/world_npc.world';
|
|
|
|
const output = String(process.env.WORLD_NPC_GRAPH_OUTPUT || '').trim();
|
|
if (!output) throw new Error('WORLD_NPC_GRAPH_OUTPUT is required');
|
|
writeFileSync(resolve(output), JSON.stringify({
|
|
locations: WORLD_LOCATIONS,
|
|
edges: WORLD_ROUTE_EDGES,
|
|
}, null, 2));
|
|
console.log(`WORLD_NPC_GRAPH_EXPORTED: ${resolve(output)}`);
|