结构(旧 game/core+engine → 新 engine/ 域): - engine/kernel/ 时钟/随机/插件协议/fxqueue/timesense/format/urgency/guide/names(原 core) - engine/narrative/ legacy/报告/列传/谱系/年轴(原 core 叙事族) - engine/runtime/ World/creation/pcgen/ApiFacade/capabilities/pluginManager/boot/clocks + Systems/*(12 系统) - engine/sim/ Market(未来 WorldSim 同行) - 旧 game/core、engine/systems、engine/world.ts 等路径全部废弃(无 re-export 兼容层) 验证:35 套件/967 测试全绿(金钟罩三档零漂移=纯搬迁无行为变化) typecheck 0 error
30 lines
997 B
TypeScript
30 lines
997 B
TypeScript
import { useGameStore } from '../store'
|
||
import { GUIDE_STEPS, computeGuide, guideAdvance } from '../../game/engine/kernel/guide'
|
||
|
||
export function GuideStrip() {
|
||
const world = useGameStore((s) => s.world)
|
||
const revision = useGameStore((s) => s.revision)
|
||
const bump = useGameStore((s) => s.bump)
|
||
void revision
|
||
if (!world) return null
|
||
const g = computeGuide(world)
|
||
if (g.done || world.state.year > 2) return null
|
||
const step = GUIDE_STEPS[g.step]
|
||
if (!step) return null
|
||
const advance = () => {
|
||
guideAdvance(world, g.step + 1)
|
||
bump()
|
||
}
|
||
return (
|
||
<div className="guide-strip">
|
||
<span className="guide-icon">✧</span>
|
||
<div style={{ flex: 1 }}>
|
||
<b>{step.title}</b>
|
||
<span className="dim" style={{ marginLeft: 8 }}>{step.hint}</span>
|
||
</div>
|
||
<button className="btn btn-sm btn-primary" onClick={advance}>完成,继续</button>
|
||
<button className="btn btn-sm" onClick={advance} title="跳过引导">×</button>
|
||
</div>
|
||
)
|
||
}
|