docs: update TODO.md for wave 3 completion

- Mark TagRow/RarityTagBudgetRow as implemented
- Mark TagGenerationRuleRegistry/RarityTagBudgetRuleRegistry as migrated
- Add new architecture note for L0/L1 IDataRow separation
- Add wave 3 modification record section
- Update dependency chain and priority sections

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Basil 2026-05-01 09:13:12 +08:00
parent ee969e4e3e
commit 5e7ea48ca8
1 changed files with 58 additions and 13 deletions

71
TODO.md
View File

@ -4,13 +4,14 @@
> **2026-04-30 第一波完成**Definition/Enum + Event > **2026-04-30 第一波完成**Definition/Enum + Event
> **2026-04-30 第二波完成**Vector3/Mathf 替换AttackPayload/HitContext 迁移 > **2026-04-30 第二波完成**Vector3/Mathf 替换AttackPayload/HitContext 迁移
> **2026-05-01 第三波完成**IDataRow 实现、TagRow/RarityTagBudgetRow、TagGenerationRuleRegistry 重构
## 概述 ## 概述
| 指标 | 数量 | 状态 | | 指标 | 数量 | 状态 |
|------|------|------| |------|------|------|
| 总文件数 | 457 | - | | 总文件数 | 457 | - |
| L0 (Domain) 可直接迁移 | ~180 | **第一波已完成 62 个文件,第二波完成 5 个文件** | | L0 (Domain) 可直接迁移 | ~180 | **第一波 62 个 + 第二波 5 个 + 第三波 6 个** |
| L1 (Infrastructure) 需重构 | ~80 | - | | L1 (Infrastructure) 需重构 | ~80 | - |
| L2 (Presentation) Unity 依赖 | ~197 | - | | L2 (Presentation) Unity 依赖 | ~197 | - |
@ -19,8 +20,9 @@
``` ```
src/ src/
├── GeometryTD.Domain/ # L0 - 纯净 C# ├── GeometryTD.Domain/ # L0 - 纯净 C#
├── GeometryTD.Infrastructure/ # L1 - Unity 胶水层 │ └── DataTable/ # IDataRow 实现TagRow, RarityTagBudgetRow
├── GeometryTD.Presentation/ # L2 - Unity 表现层 ├── GeometryTD.Infrastructure/ # L1 - Unity 胶水层(待实现)
│ └── DataTable/ # DR* : DataRowBase 包装类
└── Geometry-Tower-Defense-Base.sln └── Geometry-Tower-Defense-Base.sln
``` ```
@ -144,12 +146,12 @@ src/
- [x] `Definition/Tag/Combat/StatusEffects/IEnemyStatusTagEffect.cs` ⚠️ **已迁移** - 无 Unity 依赖 - [x] `Definition/Tag/Combat/StatusEffects/IEnemyStatusTagEffect.cs` ⚠️ **已迁移** - 无 Unity 依赖
- [x] `Definition/Tag/Combat/StatusEffects/IceTagEffect.cs` ⚠️ **已迁移** - Mathf → System.Math - [x] `Definition/Tag/Combat/StatusEffects/IceTagEffect.cs` ⚠️ **已迁移** - Mathf → System.Math
- [ ] `Definition/Tag/Combat/TagEffectResolver.cs` - [ ] `Definition/Tag/Combat/TagEffectResolver.cs`
- [ ] `Definition/Tag/Generation/ComponentTagGenerationService.cs` - [x] `Definition/Tag/Generation/TagGenerationRule.cs`**已迁移** - 纯 C#
- [x] `Definition/Tag/Generation/RarityTagBudgetRule.cs`**已迁移** - 纯 C#
- [x] `Definition/Tag/Generation/TagGenerationRuleRegistry.cs`**已重构** - 使用 IEnumerable<TagRow>
- [x] `Definition/Tag/Generation/RarityTagBudgetRuleRegistry.cs`**已重构** - 使用 IEnumerable<RarityTagBudgetRow>
- [ ] `Definition/Tag/Generation/ComponentTagGenerationService.cs` - 依赖 InventoryTagRandomContext
- [ ] `Definition/Tag/Generation/InventoryTagRandomContext.cs` - [ ] `Definition/Tag/Generation/InventoryTagRandomContext.cs`
- [ ] `Definition/Tag/Generation/RarityTagBudgetRule.cs`
- [ ] `Definition/Tag/Generation/RarityTagBudgetRuleRegistry.cs`
- [ ] `Definition/Tag/Generation/TagGenerationRule.cs`
- [ ] `Definition/Tag/Generation/TagGenerationRuleRegistry.cs`
- [x] `Definition/Tag/Metadata/Config/AbsoluteZeroTagConfig.cs` ⚠️ **已迁移** - 无 Unity 依赖 - [x] `Definition/Tag/Metadata/Config/AbsoluteZeroTagConfig.cs` ⚠️ **已迁移** - 无 Unity 依赖
- [x] `Definition/Tag/Metadata/Config/BurnSpreadTagConfig.cs` ⚠️ **已迁移** - 无 Unity 依赖 - [x] `Definition/Tag/Metadata/Config/BurnSpreadTagConfig.cs` ⚠️ **已迁移** - 无 Unity 依赖
- [x] `Definition/Tag/Metadata/Config/CritTagConfig.cs` ⚠️ **已迁移** - 无 Unity 依赖 - [x] `Definition/Tag/Metadata/Config/CritTagConfig.cs` ⚠️ **已迁移** - 无 Unity 依赖
@ -555,16 +557,23 @@ L0 迁移阻塞链:
├── TagDefinitionRegistry (L1 重构) ──→ DR* (L1) ──→ DataTableExtension (L1) ├── TagDefinitionRegistry (L1 重构) ──→ DR* (L1) ──→ DataTableExtension (L1)
├── AttackPayload (L1 重构) ──→ TagEffectResolver (L1 重构) ├── AttackPayload (L1 重构) ──→ TagEffectResolver (L1 重构)
└── MapTopologyService (L1 重构) ──→ EntityData (L2) └── MapTopologyService (L1 重构) ──→ EntityData (L2)
三层拆分新架构2026-05-01
├── L0: IDataRow 实现TagRow, RarityTagBudgetRow
│ └── Registry 使用 IEnumerable<TagRow> 而非 DRTag
└── L1: DR* : DataRowBase + L0 实例成员
└── Bridge: UGF DataTableComponent → L0 IDataRow
``` ```
### 重构优先级 ### 重构优先级
1. **第一波**Definition/Enum + Event ✅ 已完成 1. **第一波**Definition/Enum + Event ✅ 已完成
2. **第二波**Vector3 → System.Numerics.Vector3Mathf → System.Math ✅ **已完成部分** 2. **第二波**Vector3 → System.Numerics.Vector3Mathf → System.Math ✅ **已完成**
3. **第三波**Tag 系统迁移到 L1TagDefinitionRegistry、TagEffectResolver 等) 3. **第三波**IDataRow 实现、TagRow/RarityTagBudgetRow、TagGenerationRuleRegistry ✅ **已完成**
4. **第四波**GameEntry 静态调用 → 接口注入 4. **第四波**L1 DR* 包装类 + Bridge 实现UGF DataTable → L0 IDataRow
5. **第五波**Tilemap 接口抽象 5. **第五波**GameEntry 静态调用 → 接口注入
6. **第六波**:剩余 L1 文件迁移 6. **第六波**Tilemap 接口抽象
7. **第七波**:剩余 L1 文件迁移
--- ---
@ -638,6 +647,42 @@ L0 迁移阻塞链:
--- ---
## 第三波修改记录2026-05-01
### 概述
采用新架构L0 实现 `IDataRow` 接口L1 提供 `DataRowBase` 包装类。
```
L0: TagRow : IDataRow ← 纯 C# 解析逻辑
L1: DRTag : DataRowBase ← UGF 兼容层,内部持有 TagRow 实例
└── DRTag.ParseDataRow() 委托给 TagRow.ParseDataRow()
Bridge: DataTableComponent ← 将 UGF 数据转换为 L0 Row 集合
```
### 新增文件
| 文件 | 说明 |
|------|------|
| `DataTable/TagRow.cs` | 实现 `IDataRow`,含 TagId, TagType, MinRarity, Weight, IsImplemented |
| `DataTable/RarityTagBudgetRow.cs` | 实现 `IDataRow`,含 Id, Rarity, MinCount, MaxCount |
| `Definition/Tag/Generation/TagGenerationRule.cs` | 从 src-ref 迁移 |
| `Definition/Tag/Generation/RarityTagBudgetRule.cs` | 从 src-ref 迁移 |
| `Definition/Tag/Generation/TagGenerationRuleRegistry.cs` | 重构为使用 `IEnumerable<TagRow>` |
| `Definition/Tag/Generation/RarityTagBudgetRuleRegistry.cs` | 重构为使用 `IEnumerable<RarityTagBudgetRow>` |
### L0 构建状态
`dotnet build GeometryTD.Domain` **成功**0 警告 0 错误
### 待完成L1 部分)
- [ ] `DataTable/DRTag : DataRowBase` — 包装 TagRow
- [ ] `DataTable/DRRarityTagBudget : DataRowBase` — 包装 RarityTagBudgetRow
- [ ] `Bridge/DataTableBridge` — UGF DataTableComponent → L0 Row 集合
---
## 验收标准 ## 验收标准
- [x] L0 独立构建成功(`dotnet build GeometryTD.Domain`)✅ **2026-04-30** - [x] L0 独立构建成功(`dotnet build GeometryTD.Domain`)✅ **2026-04-30**