Improve the warnings in addTilesetImage()

This commit is contained in:
samme 2024-01-29 09:17:41 -08:00
parent 47d393ac29
commit 002fa6300a

View file

@ -400,7 +400,7 @@ var Tilemap = new Class({
if (!this.scene.sys.textures.exists(key)) if (!this.scene.sys.textures.exists(key))
{ {
console.warn('Invalid Tileset Image: ' + key); console.warn('Texture key "%s" not found', key);
return null; return null;
} }
@ -410,7 +410,7 @@ var Tilemap = new Class({
if (index === null && this.format === Formats.TILED_JSON) if (index === null && this.format === Formats.TILED_JSON)
{ {
console.warn('No data found for Tileset: ' + tilesetName); console.warn('Tilemap has no tileset "%s". Its tilesets are %o', tilesetName, this.tilesets);
return null; return null;
} }