Commit Graph

66 Commits

Author SHA1 Message Date
ae5a956492 chore: 删除 IDirectionMapper,全换成 IFaceHandler 2026-09-18 08:26:57 +08:00
4aaea68b65 refactor: 寻路系统改进 2026-09-17 21:21:08 +08:00
e9e9939bd8 refactor: 删除 data-state 中的 legacy 文件夹 2026-09-17 19:37:30 +08:00
87dea63399 refactor: 删除 legacy-client 文件夹 2026-09-17 18:31:18 +08:00
35d4ad6f1c fix(07-10): 编解码自洽 —— bigint 长度字节守卫与参数计数取截断后长度
- WR-01:normalizeParam 的 bigint 分支按长度字节的真实容量(255 字节 = 2^2040)判定,|值| >= 2^2040 触发告警 152 并丢弃该参数;normalizeParamList 过滤被丢弃项,不保留占位
- WR-02:add/insert/set 写入的命令参数计数一律取标准化后的 normalizeParam.length,与 normalizeParamList 的 255 截断一致
- logger.json 的 warn 152 文案改为与真实可表示范围(2^2040 - 1)一致,并写明溢出参数会被忽略
- array.test.ts 新增 bigint 长度字节边界往返、超界丢弃后命令计数/读流对齐、256/300 参数截断计数回归
2026-09-17 12:53:27 +08:00
1f9fb18cf5 fix(07-10): 写入路径越界校验与读流跨读档过期
- insert/delete/set 在 disabled 早退后、任何缓冲读写前校验 index,越界不修改任何缓冲区并告警新码 179(携带操作名/索引/当前长度)
- insert(index === length) 判为合法追加,按 add 语义写入(paramUsed 起、indexArray[length] = paramUsed),insert 合法区间变为 [0, length]
- setReplayArray 在 rebuildIndexArray 后补 expireStreams(),活跃读流跨 ReplaySystem.loadState 标记过期(#06-17-3 / 审计 H)
- types.ts 的 insert/delete/set jsDoc 写明合法区间与越界契约
- logger.json 新增 warn 179(当前最大 warn 码 178 之后)
- array.test.ts 新增 5 条边界回归(含越界前后逐字节不变量);saveLoad.test.ts 新增活跃读流跨读档告警 156 回归
2026-09-17 12:50:45 +08:00
cee843981f feat: 录像记录 & CoreState 存储接口 2026-09-14 18:09:45 +08:00
b86a060759 feat: 移动器新增 push 方法 2026-09-13 19:01:57 +08:00
ef58f79518 feat: 将 anon-tokyo 内嵌到项目中 2026-09-13 18:49:29 +08:00
46a38fa0c6 refactor: 录像系统指令 2026-09-13 16:38:19 +08:00
dd4e66a335 refactor(replay): rewrite remaining commands and register in CoreState
- ReplayUseItemCommand / ReplayEquipCommand / ReplayUnequipCommand now extend
  BaseReplayCommand with fixed numeric params and per-false-position logger
  error codes (2006-2010); string item/slot params removed, autoUnload is a
  required bool.
- remove isNumber/isItem/isBoolean/isSlot/resolveSlot helpers; all logic now
  lives in the command classes.
- drop createReplayCommandItems/registerReplayCommandItems; CoreState owns a
  private registerReplayCommand() registering the eight stable codes directly.
- prune unused replay boundary types from replay/types.ts.
- fix ReplaySandbox: a replay ending on a run of moves now finalizes the
  trailing run through notExecuted (previously the last move never started).
- rewrite commands.test.ts for the base-class design and direct registration.

Verified: data type gate 0 in-scope; vitest 19 files / 112 tests pass; prettier
and eslint clean on touched files.
2026-09-13 15:39:12 +08:00
37bfb77301 refactor(replay): add command base class and rewrite move/teleport
- BaseReplayCommand with name/paramTypes and assertParameter guard
- add optional IReplayCommand.notExecuted for trailing-step finalization
- sandbox invokes previous command notExecuted when the next command differs
- rewrite ReplayMoveCommand (batched step + notExecuted start/await) and ReplayTeleportCommand
- add replay logger error codes 2001-2005 and warn 175

NOTE: command tests still reference the pre-rewrite class names; updated in follow-up.
2026-09-13 15:16:51 +08:00
64b97bc515 fix(03-05): close data package type and cycle boundaries 2026-09-10 17:40:29 +08:00
a707be4856 feat(03-01): add Node-safe core state construction
- isolate legacy loading behind internal dependencies
- provide memory saves and remove singleton back-edges
2026-09-10 15:35:01 +08:00
7f19773477 chore(03): checkpoint data layer structure 2026-09-10 13:30:53 +08:00
7a3b6e35c1 fix(02-03): support pathfinding interruption handoff
- Queue new movement until the stopped controller settles
- Register pathfinding controller diagnostics and regression coverage
2026-09-09 21:22:49 +08:00
e27015c4d2 fix(02-02): cost 守卫允许 Infinity,仅拦 NaN 与负数 2026-09-09 19:30:12 +08:00
622008f67c refactor: 按审查意见调整寻路模块与开发规范 2026-09-09 19:05:57 +08:00
53d019f62e feat(02-02): add minimal-loss pathfinding system with getPath, controller contract and fallback policy 2026-09-09 17:29:22 +08:00
0cd6ab6a2d feat(02-02): build pathfinding directed graph with injected pass predicate and authorized types fix 2026-09-09 17:17:48 +08:00
a730f33195 fix(01-06): reject malformed raw event structures
- Validate map, layer, position, priority, and event id shapes before registration.
- Add dedicated logger codes and no-partial-registration coverage.
2026-09-08 23:53:39 +08:00
7eeab32134 refactor: 游戏地图接口重构 2026-08-21 01:39:47 +08:00
f4c77d152f feat: 楼层切换 2026-07-26 20:22:36 +08:00
bf6702be54 feat: 录像系统 2026-07-16 20:34:28 +08:00
f6383e41e8 feat: 录像数组 2026-07-13 23:19:17 +08:00
376b0fcac5 feat: 装备系统 2026-07-10 15:30:20 +08:00
9b3c3a4e40 feat: 道具效果存储 2026-07-01 23:45:06 +08:00
6029d038c6 feat: IITemStore 2026-07-01 22:19:48 +08:00
3d72954bb2 refactor: 移动顶层实施对象 2026-06-29 23:58:52 +08:00
eb34d63e96 feat: 图块信息接口 2026-06-28 19:32:46 +08:00
fadcc98864 refactor: 跟随者与勇士移动 2026-06-27 20:33:49 +08:00
9f62d8768e feat: 战斗流程 2026-06-14 00:31:10 +08:00
370f285964 refactor: 删除污染严重的 TEnemy 和 THero,仅在战斗系统中包含 2026-05-17 23:56:40 +08:00
03dc5ea60b feat: 触发器收集 2026-05-17 22:56:01 +08:00
7428f41c93 refactor: 移除 data-utils 包 2026-05-17 22:03:22 +08:00
8f4c4b7df2 refactor: 将 Layer 0 单独放到一个包 2026-05-17 21:32:23 +08:00
13fc4e1b7c refactor: TileStore 2026-05-17 16:31:08 +08:00
501a598de0 feat: 触发器系统 2026-05-16 23:43:14 +08:00
fbdd609001 feat: 动态图层 2026-05-11 23:35:46 +08:00
4c48b63e7e refactor: 地图分区与尺寸优化 2026-05-06 19:57:11 +08:00
70a58ef4dc refactor: 地图存储
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 13:33:49 +08:00
476f735adc refactor: manager 的复用方案 & fix: 类型错误
Co-authored-by: Copilot <copilot@github.com>
2026-04-24 23:12:18 +08:00
2ce50bf23e refactor: 怪物管理器存档
Co-authored-by: Copilot <copilot@github.com>
2026-04-24 22:17:01 +08:00
8c1becc9f1 refactor: 存档系统 & 勇士属性存档
Co-authored-by: Copilot <copilot@github.com>
2026-04-24 17:29:13 +08:00
1a569804d8 refactor: getFlag
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
2026-04-21 15:46:59 +08:00
51e9d758d8 refactor: 渲染端结构 2026-04-19 22:52:32 +08:00
ebae685a4e refactor: flag 系统 2026-04-18 22:39:37 +08:00
eaa725553b refactor: 怪物系统与勇士属性系统联动 2026-04-17 15:34:44 +08:00
c22a51829d refactor: IHeroState 2026-04-16 17:15:04 +08:00
6c1acb990e reafactor: 目录结构修改 2026-04-15 22:32:07 +08:00