forked from xiangwang25/whale-town-end-v2
feat: integrate invitation access, world NPCs, and deployment
This commit is contained in:
11
scripts/export_world_npc_graph.ts
Normal file
11
scripts/export_world_npc_graph.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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)}`);
|
||||
Reference in New Issue
Block a user