feat: consolidate skin policy, furniture and world NPC work

This commit is contained in:
2026-09-18 01:47:44 +08:00
parent dc188ed03d
commit aaae09399e
17 changed files with 502 additions and 217 deletions

View File

@@ -1,11 +1,17 @@
import { writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { WORLD_LOCATIONS, WORLD_ROUTE_EDGES } from '../src/business/world_npc/world_npc.world';
import { getWorldLocation, WORLD_LOCATIONS, WORLD_ROUTE_EDGES } from '../src/business/world_npc/world_npc.world';
import { WORLD_NPC_DEFINITIONS } from '../src/business/world_npc/world_npc.registry';
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,
fixedNpcPositions: WORLD_NPC_DEFINITIONS.filter((definition) => definition.stationary).map((definition) => ({
npcId: definition.npcId,
mapId: getWorldLocation(definition.homeLocationId).mapId,
...definition.fixedPosition,
})),
}, null, 2));
console.log(`WORLD_NPC_GRAPH_EXPORTED: ${resolve(output)}`);