Commit Graph

373 Commits

Author SHA1 Message Date
827e11c7a4 test(08-09): align remaining data-state integration and perf tests
- delete tileLegacy.test.ts (tested removed data-state/src/legacy; authorized retirement)

- dataClosure: local CoreState helper, Record equip.value, ReplayCommandResult/Active commands, natural sandbox step

- enemyCombination: local CoreState helper

- perf: CoreState loadStarter assembly, Record equip.value, addLayer('event')
2026-10-07 19:13:00 +08:00
98118fac14 test(08-09): align shared fixture and core playback integration tests
- closed-loop: assemble CoreState via loadStarter contract, setFloor(real IGameMap) at both call sites

- coreNode: local createCoreState helper, addLayer('event')

- replayPlayback: drop useMapState, DefaultPassPredicateImpl(state), inject Dir4FaceHandler, setFloor(real map), ReplayCommandResult assertions

- saveablesRoundTrip: real map setFloor, addLayer('event'), Record equip.value, align container restore to uid/value
2026-10-07 19:01:48 +08:00
1ef95cd36b test(08-08): align core/event/commands tests to shipped interfaces
- coreEventLayer: redirect to MapState.fromRaw real event-layer assembly
- event: CoreState config constructor + addLayer('event') + setFloor(map)
- commands: CoreState config constructor; expected values aligned to
  ReplayCommandResult (Success/Failed) instead of boolean
- commands.ts: user-fixed boolean assertParameter and 'boolean' paramTypes,
  plus user-authorized // Parameter: comments to JS typeof semantics
2026-10-07 18:04:01 +08:00
46cad94aff refactor: UI 系统 2026-10-05 19:44:33 +08:00
ba92f5291b test(08-07): align path performance tests and clear prettier gate
- performance.test.ts: drop finder/builder useMapState, inject Dir4FaceHandler, read IPathfindingResult.path length; size matrix and thresholds unchanged
- graph.test.ts: prettier-format injected-fixture helpers
- path focused run 28/28, eslint 0
2026-10-05 18:51:30 +08:00
b62b394ee9 fix(08-07): align path graph/system tests and apply authorized D-10 fixes
- graph.ts: seed start node into mapped set (B1) and restore 174 NaN/negative cost guard (B2)
- graph.test.ts: drop useMapState/DirectionMapper, inject Dir4/Dir8 handlers, reach genuine out-of-map branch and assert 183
- system.test.ts: drop finder.useMapState, inject Dir4FaceHandler, adapt to IPathfindingResult
2026-10-05 18:49:18 +08:00
e024e2d2ea test(08-06): align eventDispatch test to shipped interfaces
- remove obsolete DirectionMapper injection and its module entries (Q2)
- construct MapState with commonState only (single-arg constructor)
- resolve the event layer via shipped GameMap.eventLayer instead of the removed getLayerByAlias
- focused combat+event: 96 passed / 0 failed; eslint clean
2026-10-05 17:26:41 +08:00
71f93a526d test(08-06): align combat tests to shipped interfaces
- remove obsolete addHook(...).load() chains in combat.test.ts (3 sites)
- give the special-query buildup fixtures a no-op global aura so the
  shipped buildupSpecials early-return path reaches the special-query stage
- focused combat: 90 passed / 0 failed; perf: 6 passed
2026-10-05 17:23:55 +08:00
59e190b468 chore: 调整 AI 计划执行不按流程导致的代码问题 2026-10-05 17:15:35 +08:00
58def1809d fix(08-05): expose MapTileBase.restoreDefaultEvents and use it in toStatic
- MapTileBase.restoreDefaultEvents: protected -> public; declare on ITileBase with jsDoc

- MapLayer.toStatic(keepEvent=false): reset reused static tile via restoreDefaultEvents() instead of loadState({})
2026-10-05 16:34:18 +08:00
8d6f851727 test(08-05): align data-base map tests to shipped interfaces
- drop DirectionMapper; new MapState(state); addLayer(alias)+setEventLayer; remove addHook().load()

- align removed getLayerByAlias/getLayerAlias to layerList/alias and setDynamicDirection to tile.setFaceDirection

- dispose stale codes 62/63/64/84/130 per Q1=A; keep 60/61

- tests: expect default events for transferToDynamic(keepEvent=false); setMapList does not dedup
2026-10-05 15:19:56 +08:00
a76137f2a0 fix(08-05): correct map layer region/event logic (D-10 authorized)
- getMapData(x,y,w,h): end index lineStart+nw and buffer width*height (keep out-of-range zero padding)

- toStatic(keepEvent=false): reset reused static tile to default events via loadState({})

- cropPointEvents: reindex by new width; resize/resize2 sync indexer width; resize2 clears point events on same-size reset

- eventView.reset(): clear dirty counter so dirty() returns false after restoring reference
2026-10-05 15:19:37 +08:00
69cec80c6b test(08-04): align data-base hero tests to shipped interfaces
Replay stub route->array; drop addHook().load() chains; ItemStore requires tileStore; item.equip value/percentage as Record; setFloor(IGameMap|null); getItem->addItem. Confirmed production fixes: HeroLocation.setFloor accepts null; HeroEquipment.loadState wraps re-equip in replay disable/revert. Container tests drop rendering/followers. Focused: 114 passed + 1 skipped.
2026-10-04 23:34:49 +08:00
1bfe7080d5 test(08-03): align data-base enemy and flag tests to shipped interfaces
EnemyManager tests use a real TileStore with registered id<->num tiles; drop legacy bridge and *ById helpers (getPrefab/createEnemy take number|string); reusePrefab 2-arg; addPrefab dedupes by code only. Widen IEnemyManager.getPrefab signature to number|string (doc+impl). Flag tests align to loadState rebuilding field instances (d74cc35). Focused: 60/60 green.
2026-10-04 22:17:00 +08:00
70d530d71c test(08-02): align data-common tests to shipped replay/face interfaces
Remove addHook().load() chains; align ReplaySandbox command stubs to ReplayCommandType.Active + ReplayCommandResult; retarget failure assertions to error 72; fix short-string param token base to 32; expect FaceDirection.Unknown for unknown blocks; onRecordCommand index 0; retire utils.test.ts. Confirmed production fix: restore first-step pre-read in ReplaySandbox play()/step() (75a39ad omission). Focused: 147/147 green.
2026-10-04 18:32:21 +08:00
36d8b4fb3c test(08-01): migrate data-layer tests into __test__ dirs
Move 65 *.test.ts + 6 *.perf.ts across data-{common,base,system,state} into sibling __test__/ (data-state/test -> data-state/__test__), incl. fixtures/floors.json and non-test helpers; rewrite Rule A relative specifiers (+1 depth), keep Rule B unchanged; sync script/test-data-node.ts require paths. Gates: test:ci=66 files, test:perf=6 files, eslint clean, zero config/production changes.
2026-10-04 17:34:09 +08:00
109fad3b29 chore: 调整事件系统注释 2026-10-04 15:49:17 +08:00
ce459d9e2d chore: 调整部分错误 2026-10-04 15:44:52 +08:00
75a39ad573 refactor: 被动录像步应当在主动录像步执行期间完成 2026-10-04 15:37:26 +08:00
e25ef3fa93 refactor: combat system 2026-10-03 16:04:20 +08:00
d306d11bce refactor(04-16): 渲染端去单例化第二步(挂载到主类) 2026-10-01 19:15:12 +08:00
2d3287804d refactor: combat flow 2026-09-30 17:54:11 +08:00
bc7d631dc2 feat(04-14): 部分 UI 进一步接口适配·第二步(D-74..D-78)
D-78: main.tsx 状态栏更新改为在 client.hero.attribute 上 addHook({ onUpdateAttribute }) 并在 onUnmounted 注销;移除全局 hook 残留与手工调用垫片。

D-74/D-75: load.tsx 改依新加载系统 client.loader.start() + client.loader.manager.get*;移除旧接口成员与失效 @ts-expect-error。

D-76/D-77: 删除 render/index.tsx 的 restart 注释块、client.ts 两段兼容层注释、entry-client/src/create.ts 被注释接线与模块创建函数块。

仅含五个生产文件与 04-14-SUMMARY.md;未触用户 04-CONTEXT.md 并发改动。
2026-09-30 16:36:19 +08:00
7180649a64 refactor: hook & feat: 勇士属性更新接口 2026-09-30 15:44:29 +08:00
d8fa4b8507 refactor: Delete global loading & hook object 2026-09-30 12:30:42 +08:00
7c155be5ce refactor: map 2026-09-30 00:00:20 +08:00
b262918082 refactor: 地图 MapLayer 2026-09-29 20:21:50 +08:00
122567b050 refactor: hero 2026-09-29 16:41:44 +08:00
bbdea04393 refactor: 地图前半部分 2026-09-28 23:36:54 +08:00
b3ac1d2164 chore: 提示词调整 2026-09-27 14:01:03 +08:00
81e4e98507 refactor(04-12): 桶导出边界修正——shared 单文件化 + 消费者直连 @user/client-base(D-69/D-70) 2026-09-25 14:21:14 +08:00
0b93426d47 refactor(04-11): 渲染端结构性移植——通用渲染资产下沉 @user/client-base(D-58..D-68)
- MOVE:39 个文件由 client-modules/src/render/ 移入 client-base/src/{components,elements,map,layout}/,删除原件
- D-58:新建 client-base/src/shared/(10 常量纯摘取)+ 被移 map 文件 shared 说明符改指 4 处
- D-63:client-base/src/index.ts 新增 5 条桶导出;14 个实现层消费者改指 @user/client-base
- D-66:client-base/package.json 新增 5 条 workspace:* 依赖 + 根 pnpm i(lockfile importer 同步)
- D-59 / D-60 / D-68:10 处架构耦合以带原因 // @ts-expect-error 暂记,不反向引用、不解耦
- D-62:命名一律不变;D-64 ?raw 不处理;D-65 legacy 一律不管
2026-09-24 17:14:43 +08:00
47e71b52ae refactor: EnemyManager 2026-09-24 14:40:38 +08:00
3bc37b596d docs: 修正 types.ts 中关于录像参数的描述 2026-09-23 19:36:10 +08:00
2198734f81 refactor: replay system 2026-09-23 18:25:31 +08:00
9247a8886c feat: 调整录像参数类型的参数类型,10 ~ 31 留空,32 ~ 255 分配给短字符串 2026-09-23 16:26:17 +08:00
1fb92c3976 refactor: data-common/common 2026-09-23 16:04:50 +08:00
523ea6b333 style(04-09): collapse autotile.render call to satisfy prettier 2026-09-23 15:43:59 +08:00
88a21bf740 fix(04-09): complete texture interface adaptation in vertex/renderer
- vertex.ts: updateAutotile calls render; autotile checks use tileType; drop BlockCls import (D-43/D-44)

- renderer.ts: background autotile branches use tileType + render; add TileType import; drop BlockCls import (D-43/D-44)
2026-09-23 15:41:16 +08:00
d90c09f0a7 fix(04-09): adapt map render consumers to new texture interface
- hero.ts: hero texture literal builds tileType: TileType.Unknown (D-45)

- vertex.ts updateMoving: tileType destructure + autotile.render(tile, connection) (D-43/D-44)

- renderer.ts: autotile taken from manager.autotile; drop unused AutotileProcessor import (D-46)
2026-09-23 15:28:50 +08:00
d74cc35c8e feat: Adding should replay flag 2026-09-23 13:09:43 +08:00
7743795948 refactor: Hero equipment system 2026-09-23 13:09:19 +08:00
d36ea69066 refactor: 贴图存储方式 2026-09-22 21:11:21 +08:00
78873d0a27 refactor(04-07): adapt material interfaces (drop big-image, inject state)
- delete MaterialManager big-image implementation (IBigImageReturn import, bigImageStore/bigImageData/bigImageId fields, 5 methods, setDefaultFrame coupling)
- change 7 consumers getIfBigImage -> getTile (door x2, hero x3, renderer, vertex); drop getOffsetPool big-image offset loop
- delete cache.ts legacy big-image path (RenderableDataBase.bigImage, literals, destructuring, enemys special-case, big-image branch, unused enemys decl)
- inject state via constructor into MaterialManager/AutotileProcessor/AssetBuilder/TrackedAssetData (from ClientCore; renderer uses manager.state)
- add MaterialManager.textures (dedicated TextureStore)
- declare @user/data-state in client-base/package.json (lockfile not synced)
2026-09-22 11:52:55 +08:00
4e305e392a refactor(type): material types. 2026-09-21 19:16:33 +08:00
50bd679fad feat: 渲染端配置加载 2026-09-21 10:09:20 +08:00
d65b107819 refactor: 渲染端配置文件 2026-09-20 23:49:27 +08:00
cc434a6c66 refactor: 加载系统重构 2026-09-20 20:53:46 +08:00
d12790280a feat: 完成数据端数据类型的构建 2026-09-20 19:11:43 +08:00
704294f9c3 fix(04-05): forward layer area/block updates via IMapLayerHooks 2026-09-20 16:46:17 +08:00