Files
ChronicleOfTheImmortalClan/src/renderer/ui/components/GuideStrip.tsx
T
thzxx ff6df8054c refactor(0.1.14-P1): 内核归位——game/ 按引擎架构重排(零行为漂移)
结构(旧 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
2026-08-23 13:23:25 +08:00

30 lines
997 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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>
)
}