feat(plugins): 迁移非 1.13c 原版「地图全开 (Automap Reveal)」至 plugins/automap-reveal #714

Closed
opened 2026-10-03 05:52:55 +00:00 by troytt · 1 comment
Owner

背景

Diablo II v1.13c 原版仅随角色探索揭示自动地图(Automap)。当前仓库中的 automapReveal(off | level | act 地图全开增强)属于非 1.13c 原版的客户端增强功能。

当前核心代码位置

  • src/client/settings/client-settings.ts:AutomapRevealMode(off | level | act)
  • src/client/toolbar/toolbar.ts:工具栏 #d2-toolbar-automap-select 下拉框
  • src/client/automap/automap-view.ts:setMode(mode)
  • src/client/main.ts / src/client/session/online-session.ts:状态同步与关卡切换处理

迁移目标

  • 依赖顶层 plugins/ 插件框架与 PluginHost 落地后,将地图全开增强拆分为独立插件 plugins/automap-reveal/。
  • 插件关闭时严格保持 1.13c 原版战争迷雾/探索揭示行为(off);启用后可在插件配置菜单或工具栏贡献区切换 off | level | act。

验收标准

  • plugins/automap-reveal/index.ts 实现 D2WebPlugin 契约并通过 tests/arch/boundaries.test.ts 插件边界检查
  • 插件禁用时自动恢复 off 原版迷雾行为
  • npm run typecheck 与 npx vitest run 100% 通过
## 背景 Diablo II v1.13c 原版仅随角色探索揭示自动地图(Automap)。当前仓库中的 `automapReveal`(`off | level | act` 地图全开增强)属于非 1.13c 原版的客户端增强功能。 ## 当前核心代码位置 - `src/client/settings/client-settings.ts`:`AutomapRevealMode`(`off | level | act`) - `src/client/toolbar/toolbar.ts`:工具栏 `#d2-toolbar-automap-select` 下拉框 - `src/client/automap/automap-view.ts`:`setMode(mode)` - `src/client/main.ts` / `src/client/session/online-session.ts`:状态同步与关卡切换处理 ## 迁移目标 - 依赖顶层 `plugins/` 插件框架与 `PluginHost` 落地后,将地图全开增强拆分为独立插件 `plugins/automap-reveal/`。 - 插件关闭时严格保持 1.13c 原版战争迷雾/探索揭示行为(`off`);启用后可在插件配置菜单或工具栏贡献区切换 `off | level | act`。 ## 验收标准 - [ ] `plugins/automap-reveal/index.ts` 实现 `D2WebPlugin` 契约并通过 `tests/arch/boundaries.test.ts` 插件边界检查 - [ ] 插件禁用时自动恢复 `off` 原版迷雾行为 - [ ] `npm run typecheck` 与 `npx vitest run` 100% 通过
Author
Owner

Fixed in commit fdde06b (origin/main): migrated the non-1.13c Automap Reveal (off | level | act) feature out of core src/client/toolbar/toolbar.ts into plugins/automap-reveal/index.ts. When automap-reveal is disabled, PluginHost releases the capability claim and strictly enforces 1.13c server-driven fog-of-war (automapReveal = "off") while removing #d2-toolbar-automap-select from the toolbar.

Fixed in commit `fdde06b` (`origin/main`): migrated the non-1.13c Automap Reveal (`off | level | act`) feature out of core `src/client/toolbar/toolbar.ts` into `plugins/automap-reveal/index.ts`. When `automap-reveal` is disabled, `PluginHost` releases the capability claim and strictly enforces 1.13c server-driven fog-of-war (`automapReveal = "off"`) while removing `#d2-toolbar-automap-select` from the toolbar.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#714
No description provided.