mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-12 02:49:20 +00:00
debug.disableInternalCheckTile
This commit is contained in:
parent
ae5763be9b
commit
2f772f5913
@ -94,7 +94,7 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
isValidTile(tile) {
|
isValidTile(tile) {
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV && !globalConfig.debug.disableInternalCheckTile) {
|
||||||
assert(tile instanceof Vector, "tile is not a vector");
|
assert(tile instanceof Vector, "tile is not a vector");
|
||||||
}
|
}
|
||||||
return Number.isInteger(tile.x) && Number.isInteger(tile.y);
|
return Number.isInteger(tile.x) && Number.isInteger(tile.y);
|
||||||
@ -106,7 +106,7 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
* @returns {Entity} Entity or null
|
* @returns {Entity} Entity or null
|
||||||
*/
|
*/
|
||||||
getTileContent(tile) {
|
getTileContent(tile) {
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV && !globalConfig.debug.disableInternalCheckTile) {
|
||||||
this.internalCheckTile(tile);
|
this.internalCheckTile(tile);
|
||||||
}
|
}
|
||||||
const chunk = this.getChunkAtTileOrNull(tile.x, tile.y);
|
const chunk = this.getChunkAtTileOrNull(tile.x, tile.y);
|
||||||
@ -140,7 +140,7 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
isTileUsed(tile) {
|
isTileUsed(tile) {
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV && !globalConfig.debug.disableInternalCheckTile) {
|
||||||
this.internalCheckTile(tile);
|
this.internalCheckTile(tile);
|
||||||
}
|
}
|
||||||
const chunk = this.getChunkAtTileOrNull(tile.x, tile.y);
|
const chunk = this.getChunkAtTileOrNull(tile.x, tile.y);
|
||||||
@ -164,7 +164,7 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
* @param {Entity} entity
|
* @param {Entity} entity
|
||||||
*/
|
*/
|
||||||
setTileContent(tile, entity) {
|
setTileContent(tile, entity) {
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV && !globalConfig.debug.disableInternalCheckTile) {
|
||||||
this.internalCheckTile(tile);
|
this.internalCheckTile(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
* @param {Vector} tile
|
* @param {Vector} tile
|
||||||
*/
|
*/
|
||||||
clearTile(tile) {
|
clearTile(tile) {
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV && !globalConfig.debug.disableInternalCheckTile) {
|
||||||
this.internalCheckTile(tile);
|
this.internalCheckTile(tile);
|
||||||
}
|
}
|
||||||
this.getOrCreateChunkAtTile(tile.x, tile.y).setTileContentFromWorldCords(tile.x, tile.y, null);
|
this.getOrCreateChunkAtTile(tile.x, tile.y).setTileContentFromWorldCords(tile.x, tile.y, null);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user