1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-12 10:59:23 +00:00

debug.disableGetTileAsserts

This commit is contained in:
Dimava 2020-06-01 14:00:45 +03:00
parent 2f772f5913
commit afe5e87f53

View File

@ -318,10 +318,12 @@ export class MapChunk {
getTileContentFromWorldCoords(worldX, worldY) {
const localX = worldX - this.tileX;
const localY = worldY - this.tileY;
if (!globalConfig.debug.disableGetTileAsserts) {
assert(localX >= 0, "Local X is < 0");
assert(localY >= 0, "Local Y is < 0");
assert(localX < globalConfig.mapChunkSize, "Local X is >= chunk size");
assert(localY < globalConfig.mapChunkSize, "Local Y is >= chunk size");
}
return this.contents[localX][localY] || null;
}