mirror of
https://github.com/unanmed/ginka-generator.git
synced 2026-05-14 04:41:12 +08:00
fix: 图块为 null
This commit is contained in:
parent
224005b44b
commit
ace5a04f58
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user