Skip to content

Commit

Permalink
fix: improve logs for problem with definition objects accessing a spr…
Browse files Browse the repository at this point in the history
…ite for further investigation
  • Loading branch information
Cammin committed May 8, 2024
1 parent d89ba27 commit bd5617e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,14 @@ public Sprite GetSpriteForTilesetRectangle(TilesetRectangle def)

if (!_allSprites.TryGetValue(def.TilesetUid, out var sprites))
{
_logger.LogError($"Problem getting sprite for TilesetRectangle def uid {def.TilesetUid}: Couldn't get the dictionary for the tileset uid.");
TilesetDefinition tilesetDef = def.Tileset;
if (tilesetDef == null)
{
_logger.LogError($"Problem getting sprite for TilesetRectangle def uid {def.TilesetUid}: No definition exists?");
return null;
}

_logger.LogError($"Problem getting sprite for TilesetRectangle def uid \"{tilesetDef.Identifier}\": Couldn't get the dictionary for the tileset uid");
return null;
}

Expand Down

0 comments on commit bd5617e

Please sign in to comment.