Scripting: Added Tile.image for accessing a tile's image data #3882
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Usually one could load the image based on
Tile.imageFileName
, but when a tile's image has been set directly usingTile.setImage
, this is not possible. This can happen for example when an importer has used this function since there was no external image file to refer to, or it used an unsupported image format.Tile.image
now provides convenient access to the tile's image, falling back to the tileset's image when the tile has no individual image.As such, this function also provides access to the tileset's image, which would ideally be available through
Tileset.image
, but this property was already taken and used for the image file name. To free up this property in the future it is now deprecated. Extensions should switch to the newTileset.imageFileName
property.Part of issue #3630