Rework story engine flow and reorganize project docs
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-06 23:19:00 +08:00
parent d678929064
commit ddcb5d5c8c
241 changed files with 19805 additions and 2478 deletions

View File

@@ -0,0 +1,24 @@
import { describe, expect, it } from 'vitest';
import { type CustomWorldProfile } from '../../types';
import { compileCampaignFromWorldProfile } from './campaignPackCompiler';
describe('campaignPackCompiler', () => {
it('builds scenario and campaign packs from a world profile', () => {
const profile = {
id: 'world-1',
name: '裂潮边城',
scenarioPackId: 'scenario-pack:rift',
campaignPackId: 'campaign-pack:rift-main',
storyGraph: {
visibleThreads: [{ id: 'thread-1', title: '封桥旧案' }],
},
playableNpcs: [{ id: 'npc-1', templateCharacterId: 'archer-hero' }],
} as unknown as CustomWorldProfile;
const compiled = compileCampaignFromWorldProfile({ profile });
expect(compiled.scenarioPack.id).toBe('scenario-pack:rift');
expect(compiled.campaignPack.id).toBe('campaign-pack:rift-main');
});
});