fix(07-05): #06-06-1 warn code 128 for an out-of-map dynamic transfer

- transferToDynamic 越界分支由 131 改为 128,对齐两个 transferToStatic* 兄弟分支
- 取消 mapLayer.test.ts 的码 128 用例 skip
This commit is contained in:
unanmed 2026-09-15 20:45:01 +08:00
parent 3b1b9f1d5c
commit 620382cc5f
2 changed files with 3 additions and 4 deletions

View File

@ -414,9 +414,8 @@ describe('MapLayer dynamic conversion', () => {
expect([...layer.iterateDynamicTiles()]).toEqual([]);
});
// 疑似缺陷 #06-06-1transferToDynamic 越图当前复用码 131setEventLayer 专属码),
// 正确预期应为与 transferToStatic 一致的越界码 128待用户确认后取消 skip
it.skip('warns code 128 for an out-of-map transferToDynamic', () => {
// 验证越图的 transferToDynamic 发越界码 128 且不产生图块(#06-06-1 已修复)
it('warns code 128 for an out-of-map transferToDynamic', () => {
const { layer } = createFixture();
const result = logger.catch(() => layer.transferToDynamic(9, 9));

View File

@ -438,7 +438,7 @@ export class MapLayer
keepEvent: boolean = true
): IDynamicTile | null {
if (!this.inMap(x, y)) {
logger.warn(131, x.toString(), y.toString());
logger.warn(128, x.toString(), y.toString());
return null;
}
const num = this.getBlock(x, y);