diff --git a/AGENTS.md b/AGENTS.md index e837cc3..ce22e67 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # AGENTS.md 仙途家族志 · Chronicle of the Immortal Clan — Electron + React + TS 家族修仙模拟器。全部 UI 与文案为中文。 -当前版本 **0.1.21**(《大势流转》:era↔景气双向闭环 + 世界史表 + 渲染管线修复)。 +当前版本 **0.1.22**(《灯下春秋》:Modal 全走 body Portal(z 层越界修复)+ 年报不打断自动速度)。 ## 命令 @@ -60,7 +60,7 @@ src/main/ Electron 主进程(app:// 协议 + IPC 存 - **特效/音效语义出口**:`WorldEventBus.onFx?(em: FxEmit)` + `World.emitFx(kind, source?)`(零 rng 消耗);UI 的 `makeBus` 桥接 FxGate;`onLog kind` 音效映射保留作兜底。 - **插件架构**(0.1.8 起,路径已迁 engine/runtime|kernel):`kernel/plugin.ts` 协议、`runtime/pluginManager.ts` 安装管线(依赖校验/异常回滚/追踪型上下文——注销时钩子全摘)、`plugin-bootstrap.ts` 三核心插件(core-systems/core-data/core-events protected)。事件多池 `world.eventPools`;**findEvent 必须带 world 参数查池**。能力卡 12 张经 `viaCap` 注册;tournament/tribulation/apprentice/season 四卡各自内部检查 `w.sysEnabled`(无独立钩子)。 - **门面**:`runtime/ApiFacade.ts` GameFacade(act 24 项/query 6 类/subscribe 退订协议/about);**UI 面板事实走 world 直调**(act 为测试/自动化通道),`actDirect` 与 ACT_CATALOG 语义对齐(0.1.20 补齐全 24 项);store 的 `facade` 必须在 openState/startNewGame 赋值。 -- **金钟罩(双基线)**:`tests/clock.test.ts` 的 `GOLDEN`(直调冻结世界)+ `GOLDEN_RESOLVED`(自动 resolve 长跑"现实"世界),各 3 seed × 三档月数(560/1200/2160)共 18 值。当前为 **0.1.21 基线**(见注释)。指纹 `tests/fingerprint.helper.ts` 含全世界轴(era/stance/prosperity/relationsWithOthers/calamity/pendingEvent/eventQueue/worldAnnals)。**有意变更时序/数值时**:指纹一并重算并在注释注明原因。 +- **金钟罩(双基线)**:`tests/clock.test.ts` 的 `GOLDEN`(直调冻结世界)+ `GOLDEN_RESOLVED`(自动 resolve 长跑"现实"世界),各 3 seed × 三档月数(560/1200/2160)共 18 值。当前为 **0.1.21 基线**(0.1.22 纯 UI 修复未动引擎,基线不变;见注释)。指纹 `tests/fingerprint.helper.ts` 含全世界轴(era/stance/prosperity/relationsWithOthers/calamity/pendingEvent/eventQueue/worldAnnals)。**有意变更时序/数值时**:指纹一并重算并在注释注明原因。 ## 世界自演进模型(0.1.14 sim/ 层,改数值勿动流程) diff --git a/package.json b/package.json index 0a1ddbc..daf235f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "chronicle-of-the-immortal-clan", "productName": "仙途家族志", - "version": "0.1.21", + "version": "0.1.22", "description": "修仙 · 家族 · 经营 · 战斗 模拟器", "main": "./out/main/index.js", "author": "MetonaTeam", diff --git a/src/renderer/game/engine/runtime/ApiFacade.ts b/src/renderer/game/engine/runtime/ApiFacade.ts index 6daf20c..b20a8ff 100644 --- a/src/renderer/game/engine/runtime/ApiFacade.ts +++ b/src/renderer/game/engine/runtime/ApiFacade.ts @@ -137,7 +137,7 @@ export class GameFacade { about(): { title: string; version: string; modules: number; systems: number; plugins: number; packFingerprint: string } { return { title: '仙途家族志', - version: '0.1.21', + version: '0.1.22', modules: this.world.systemList().length, systems: this.world.systemList().filter((s) => s.enabled).length, plugins: this.world.pluginList().length, diff --git a/src/renderer/ui/components/ModalShell.tsx b/src/renderer/ui/components/ModalShell.tsx index f80350f..cadf3c9 100644 --- a/src/renderer/ui/components/ModalShell.tsx +++ b/src/renderer/ui/components/ModalShell.tsx @@ -1,4 +1,5 @@ import { useEffect, type ReactNode } from 'react' +import { createPortal } from 'react-dom' export interface ModalShellProps { title: string @@ -41,7 +42,9 @@ export function ModalShell({ return () => window.removeEventListener('keydown', onKey) }, [onClose]) - return ( + // Portal 到 document.body:任何祖先(.main-left z1 / .app)的层叠上下文都无法压住弹框, + // 顶部菜单/主域均在其下(0.1.22 修复:弹框出现在宗族/谱系菜单下方的 z-index 越界)。 + const shell = (