Commit Graph

342 Commits

Author SHA1 Message Date
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
49d86a2c57 fix(04-05): read hero status via client attribute API 2026-09-20 16:43:05 +08:00
a3f3e90e47 style: hero render 2026-09-20 15:50:42 +08:00
3414233e34 refactor(04-04): align hero renderer with IFaceManager and split hooks
- inject IFaceManager into MapHeroRenderer; degrade/next use Dir4FaceHandler via FaceGroup.Dir4, movement uses hero.mover.faceHandler (Dir8)
- IMapExtensionManager.addHero gains faceManager param; manager.ts forwards it
- split MapHeroHook into MapHeroLocationHook / MapHeroMoverHook; onSetPos unconditional
- handle ObjectMoveType.AnimDir via step.dir
- replace mutate-animate TimingFn with @motajs/animate ExcitationCurve2D in hero.ts
2026-09-19 16:51:55 +08:00
4e649533ee chore: 内部接口改名 2026-09-19 12:33:10 +08:00
ed0b95b1c4 feat: CoreState 配置添加 loadStarter 2026-09-18 20:36:03 +08:00
f5a6ed8cf6 refactor: 加载系统 2026-09-18 20:30:40 +08:00
a3826bfa6a refactor(04-03): rebind hero renderer to IHeroLocation and existing hooks
- manager.ts / types.ts: heroMap, addHero, removeHero keyed by IHeroLocation
- hero.ts: bind IHeroLocation, read getCurrentFaceDirection, use ObjectAnimDirection
- MapHeroHook subscribes IHeroLocationHooks / IObjectMoverHooks with existing member names (D-21)
- IMapHeroRenderer drops the 8 external drive members per D-20; D-18 / D-22 members preserved
- hero.image read converged to one minimal compile bridge annotated for D-18
2026-09-18 15:55:02 +08:00
ae5a956492 chore: 删除 IDirectionMapper,全换成 IFaceHandler 2026-09-18 08:26:57 +08:00
4aaea68b65 refactor: 寻路系统改进 2026-09-17 21:21:08 +08:00
bb1986508a fix(07-15): restore modifier bookkeeping when cloning an attribute
- clone() now binds each cloned modifier to the clone, records its modifierName, mirrors the source save flag and recomputes the attribute, matching addModifier's bookkeeping
- a cloned attribute can enumerate, index and persist its modifiers, and a cloned modifier's setValue notifies the clone
- add the bookkeeping and save-ability regression cases
2026-09-17 20:55:58 +08:00
49116c0784 fix(07-15): reject an expand multiplier of exactly one
- both multiplier checks tighten from < 1 to <= 1, matching warning 149's own text (must be greater than 1)
- an exact multiplier of 1 now warns 149 and falls back to the existing factor 2, so buffer expansion always terminates
- add the multiplier-of-one regression case (two code 149 warnings, 15 appended steps all read back in order)
2026-09-17 20:52:20 +08:00
a7c9f97c94 fix(07-15): drop unencodable replay params instead of a zero-length record
- normalizeParam returns null for an unencodable param value, matching its own jsDoc and the documented discard semantics of normalizeParamList
- the command param count, the bytes actually written and the param cursor stay consistent so later commands keep their correct byte offsets
- add the discard-alignment regression case (count 0, later command bytes intact, read stream aligned)
2026-09-17 20:48:47 +08:00
53f067a0af fix(07-15): compare equipment without rebinding the equipped modifiers
- compareEquip clones each compared item's modifier before adding it to the comparison clone and removes the same clone objects afterwards
- the live attribute's already-bound modifiers never enter the clone and are never unbound
- add the equipped-item diff regression case (both directions, no warning 108, live bookkeeping untouched)
2026-09-17 20:46:10 +08:00
e9e9939bd8 refactor: 删除 data-state 中的 legacy 文件夹 2026-09-17 19:37:30 +08:00
a2a8e6ec35 refactor: ReplaySystem.route -> ReplaySystem.array,修复 disabled 标记在 setReplayArray 中清零可能导致意外记录的问题 2026-09-17 19:18:30 +08:00
3a3a6ac82d refactor: 统一 refreshEnemy 和 refreshEnemyAndClearCache 2026-09-17 19:08:34 +08:00
34ba9e873b fix: 录像 onRecordCommand 钩子参数错误 2026-09-17 19:02:47 +08:00
219ac4991d fix: Flag 系统语义问题 2026-09-17 19:01:46 +08:00
a027b04d14 chore: 清空类型错误 2026-09-17 18:38:29 +08:00
6d7cc2af22 refactor: 删除 legacy-client 2026-09-17 18:30:39 +08:00
12c2943c5e refactor: 删除 legacy-plugin-client 2026-09-17 18:28:06 +08:00
e2e27d9ff2 refactor: 删除 data-fallback 2026-09-17 18:24:07 +08:00
10755475a4 refactor: 删除 legacy-plugin-data 2026-09-17 18:21:35 +08:00
13234b762a fix(07-13): clear existing dynamic tiles before loading
- add private clearDynamics() that snapshots the managed dynamic tiles and drops each via the deleteDynamic semantics (syncStaticEvent + removeTile + onDeleteDynamic), without awaiting the hook
- call it as the first line of loadState so all three compression tiers and the missing-dynamicBlocks case start from a clean slate (#06-17-8)
- add regressions: mapLayer hook/instance witness and the three-tier repeated-load non-accumulation case
2026-09-17 17:27:09 +08:00
c1df1e0116 fix(07-13): prune deleted views and empty sourceless points
- deleteEnemy removes the deleted view from point.affectedBy and drops its point.damages entry so lazy refreshIndex never revisits a dead view (IN-01)
- deleteMapDamage removes the sourcelessDamage IPointInfo once both damages and affectedBy are empty, keeping markDirtyIndex
- add IN-01 regressions: dead-view witness (getDamageWithoutCheck not called) and the two arms of the sourceless empty-point cleanup
2026-09-17 17:23:01 +08:00
cff4291512 fix(07-13): #CR-02 mark removed indexes dirty and register empty view sets
removeEnemyAffecting collects removed coordinate indexes and markDirtyIndex each; refreshEnemyAndClearCache/refreshEnemy register enemyStore.set(view, set) before the empty-set return so later markEnemyDirty uses local refresh instead of refreshAll(). Adds a Chinese comment before each new it.
2026-09-17 16:56:33 +08:00
3e68880e82 fix(07-12): compareEquip 在克隆属性上按对象定位删除目标(Q4 仅修 (i))
- 原属性索引为负或克隆槽位越界时不删除任何修饰器
- 删除目标改为克隆属性同槽位的自身对象,不再跨对象拼接索引
- 回归构造 rebuildModifiers 重建后的负索引路径,含触发机制断言
2026-09-17 16:06:53 +08:00
d8fb6f088c fix(07-12): loadState 用 disable/revert 包裹重新装备(WR-06)
- HeroEquipment.loadState 在重新装备循环外包一层录像禁用窗口,try/finally 保证恢复
- 录像桩补禁用计数语义,读档期间写入的指令被丢弃
- 回归覆盖:读档不产生录像指令、禁用与恢复配对平衡、读档后 equip/unequip 记录仍保留
2026-09-17 16:01:32 +08:00
ab18aa3ec7 fix(07-12): deleteModifierByIndex 委托 deleteModifier(WR-05)
- 按索引取出修饰器后委托 deleteModifier,删除簿记收敛为一份实现
- 返回被删修饰器;索引越界或为负返回 null 且不删除任何修饰器
- 回归覆盖:迭代器产出、索引解析、final 重算、重新挂载、存盘开关清理、越界
2026-09-17 15:56:50 +08:00
762bf2e95c docs(07-12): 记录装备加成事实源契约(WR-04 设计如此,零行为变更)
- types.ts 的 IEquipmentStateSave / IEquipmentState 补充契约注释
- 装备自身数值与百分比加成是事实源,存档持久化这两个表并由其重建装备修饰器
- 跨读档不保留旧修饰器引用属预期;运行时改加成须经装备自身而非改其修饰器
2026-09-17 15:56:26 +08:00
b99d040b11 test(07-12): 对齐空存档 nextUid 重置契约(IN-02,测试专用)
- saveLoad.test.ts 的码 58 用例改写为「空存档 → 随后 add 发号 0 且不产生码 58」
- 用例内注释登记码 58 分支只剩非空畸形数组可达,生产实现保持原样
- equipStore.ts 零改动(生产修复基线 ba60ef9)
2026-09-17 15:54:02 +08:00