From ace5a04f58d43be17218e567276c8e146378ece6 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Thu, 11 Dec 2025 22:56:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BE=E5=9D=97=E4=B8=BA=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/src/auto/tower.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/data/src/auto/tower.ts b/data/src/auto/tower.ts index 903fb05..40ef47f 100644 --- a/data/src/auto/tower.ts +++ b/data/src/auto/tower.ts @@ -420,6 +420,19 @@ export function convertTowerMap( } }); + for (let nx = 0; nx < width; nx++) { + for (let ny = 0; ny < height; ny++) { + if ( + typeof converted[ny][nx] !== 'number' || + isNaN(converted[ny][nx]) || + !isFinite(converted[ny][nx]) || + converted[ny][nx] < 0 + ) { + converted[ny][nx] = 0; + } + } + } + return { map: converted, hasCannotInOut