feat: P25 conditional routing, nextScene supports Choice[] with conditions

This commit is contained in:
2026-06-13 00:50:48 +08:00
parent db4f06883d
commit e949a84171
7 changed files with 108 additions and 10 deletions

View File

@@ -50,8 +50,13 @@ export class SceneManager {
}
}
if (scene.nextScene && !targets.includes(scene.nextScene)) {
targets.push(scene.nextScene)
if (scene.nextScene) {
const nextIds = Array.isArray(scene.nextScene)
? scene.nextScene.map(r => r.targetScene)
: [scene.nextScene]
for (const id of nextIds) {
if (!targets.includes(id)) targets.push(id)
}
}
return targets