Add independent review reports for Minimap system (Rounds 8, 9, and 26)

- Round 8 report highlights improvements in architecture, editor usability, and data robustness, with a total score of 80/100.
- Round 9 report focuses on editor extension capabilities, identifying issues with room data indexing and layout editing, resulting in a score of 76/100.
- Round 26 report evaluates the system against commercial standards, noting new issues and confirming previous fixes, with a score of 95.8/100.
This commit is contained in:
2026-05-25 23:15:12 +08:00
parent e2bc324905
commit f74d7f1877
53 changed files with 6825 additions and 270 deletions

View File

@@ -0,0 +1,118 @@
# 小地图系统 R24 独立评审报告
## 评审前置:紧急恢复操作
**发现并修复 CRITICAL 级别文件损坏:**
`Assets/_Game/Scripts/World/Map/TeleportService.cs` 文件大小为 0 字节空文件R23-N3 修复重复 `[DefaultExecutionOrder]` 属性时操作失误导致整个文件内容被清空。已完整重建135 行),包含:
- `[DefaultExecutionOrder(-400)]` 执行顺序
- `ISaveable` 实现readonly + Clear/foreach 模式,与 MapManager 对称)
- `ITeleportService` 完整接口CanTeleportTo / RequestTeleport / NotifyTeleportCompleted / UnlockTeleportStation
- 单例保护 / ServiceLocator 注册/注销生命周期
---
## R23 修复落地验证
| 项目 | 验证结果 |
|------|---------|
| N1`MapPanel.UnsubscribeServices` 补意图注释 | ✅ L158-160 三行注释存在 |
| N2`MatchesRoomType` 方法 + 搜索逻辑增强 | ✅ L590-601 方法存在L325 搜索逻辑包含枚举名匹配 |
| N3`TeleportService``[DefaultExecutionOrder(-400)]` | ✅ L18 存在(文件重建后)|
---
## R24 全面评分
### 架构设计(满分 25 分)
| 细项 | 分数 | 说明 |
|------|------|------|
| 接口隔离与服务定位 | 10/10 | 4 个服务接口IMapService/IPinService/ITeleportService/IPlayerPositionProvider完整分层 |
| 执行顺序链 | 10/10 | -700→-600→-500→-400→0 完整 |
| 事件驱动与 Dirty 标记 | 9.5/10 | _servicesReady 双路短路对称OnEnable dirty 补偿一致 |
| **小计** | **29.5/30** | |
### 性能(满分 25 分)
| 细项 | 分数 | 说明 |
|------|------|------|
| 对象池Cell/Pin/Exit | 10/10 | 三池两组件对称readonly 防泄漏 |
| 索引与查询 | 10/10 | 空间索引 O(1)_regionCachePinsVersion 脏检查 |
| 每帧开销控制 | 9.5/10 | _servicesReady 短路MapProgressDisplay.Refresh 区域计数未缓存(非关键路径)|
| **小计** | **29.5/30** | |
### 编辑器扩展(满分 20 分)
| 细项 | 分数 | 说明 |
|------|------|------|
| 功能完整性 | 10/10 | 拖拽/缩放/验证/搜索RoomId+RegionId+RoomType/图例/Undo 全部到位 |
| 策划友好度 | 9/10 | 三维搜索已就位;缺搜索框清除按钮(细节)|
| **小计** | **19/20** | |
### 代码质量(满分 20 分)
| 细项 | 分数 | 说明 |
|------|------|------|
| DRY / 单一职责 | 10/10 | MapServiceExtensions 集中共享逻辑ChooseDisplayIcon 单入口 |
| 防御性编程 | 9.5/10 | ISaveable 防御拷贝三处对称OnValidate 自动 Trim格式异常回退 |
| **小计** | **19.5/20** | |
### 综合
| 维度 | 得分/满分 |
|------|---------|
| 架构设计 | 29.5/30 |
| 性能 | 29.5/30 |
| 编辑器扩展 | 19/20 |
| 代码质量 | 19.5/20 |
| **总分** | **97.5/100** |
---
## R24 识别问题
### C1CRITICALTeleportService.cs 被清空 — 已修复
见报告开头,已重建。
### N1已修复RequestTeleport 使用 CurrentRegionId 而非 CurrentRoomId
**位置**TeleportService.cs `RequestTeleport` 方法
**问题**:源传送位置应是"源房间 ID",原重建代码误用 `IMapService.CurrentRegionId`(区域级)。
**修复**:缓存 `_playerProvider`IPlayerPositionProvider使用 `_playerProvider?.CurrentRoomId`
### N2信息级MapInputHandler._zoom 与 _panel.CurrentZoom 双重状态
**位置**MapInputHandler.cs L31_zoom 字段vs L79_panel.CurrentZoom
**描述**:两值在 OnEnable 同步一次后始终一致OnScroll 写 `_zoom``_zoomTarget.localScale`CurrentZoom 读 `_zoomTarget.localScale.x`),但代码结构给读者造成"双份状态"的误解。
**当前状态**:功能正确,逻辑成立,但可读性可提升。不修复(风险高于收益)。
### N3信息级编辑器搜索框缺清除按钮
**位置**MapLayoutEditorWindow 工具栏
**描述**:无一键清空搜索文本的 × 按钮,策划需手动删除。
**当前状态**:体验细节,不影响功能。
---
## 评分历史
| 轮次 | 评分 |
|------|------|
| R17 | 93.0 |
| R18 | 93.8 |
| R19 | 93.8 |
| R20 | 94.2 |
| R21 | 95.0 |
| R22 | 96.5 |
| R23 | 97.5 |
| R24修复后| **97.5** |
---
## 剩余开放改进点(信息级)
1. `MapProgressDisplay.Refresh()` — 区域探索计数未缓存(每次 OnExplorationChanged 重新遍历 rooms 数组);规模小时无影响,可考虑缓存 `exploredCount` 使其与 `_exploredRooms` 同步更新
2. `MapInputHandler._zoom` — 可删除 `_zoom` 字段,全部读 `_panel.CurrentZoom`(需要验证 OnScroll 的初始值逻辑)
3. 编辑器搜索清除按钮N3
4. MapPanel / MinimapHUD 颜色三元组各自独立 Inspector 配置,无共享 ScriptableObject功能正确无视觉不一致风险