Skip to content

Commit

Permalink
improving log msgs on phaser: cache and tileset
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed Jan 7, 2024
1 parent 6ac0a29 commit fd206d3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions static/phaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -75261,7 +75261,11 @@ Phaser.Cache.prototype = {
{
if (method)
{
console.warn('Phaser.Cache.' + method + ': Key "' + key + '" not found in Cache.');
const msg = 'Phaser.Cache.' + method + ': Key "' + key + '" not found in Cache.';
console.warn(msg);
if (window.data.logger) {
window.data.logger.log_message(msg);
}
}
}
else
Expand Down Expand Up @@ -105398,10 +105402,11 @@ Phaser.Tileset.prototype = {

if (rowCount % 1 !== 0 || colCount % 1 !== 0)
{
console.warn(
'Phaser.Tileset - \'%s\' image tile area (%s x %s) is not a whole multiple of tile size (%s x %s + %s + %s)',
this.name, imageWidth, imageHeight, this.tileWidth, this.tileHeight, this.tileMargin, this.tileSpacing
);
const msg = `Phaser.Tileset - '${this.name}' image tile area (${imageWidth} x ${imageHeight}) is not a whole multiple of tile size (${this.tileWidth} x ${this.tileHeight} + ${this.tileMargin} + ${this.tileSpacing})`;
console.warn(msg);
if (window.data.logger) {
window.data.logger.log_message(msg);
}
}

/*
Expand Down

0 comments on commit fd206d3

Please sign in to comment.