Skip to content

Commit 6bbccdb

Browse files
committed
Merge pull request #102561 from Dowsley/docs/update-tilemap-references
Replace references from TileMap to TileMapLayer in documentation
2 parents 2161217 + 77e661a commit 6bbccdb

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

doc/classes/TileData.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Settings for a single tile in a [TileSet].
55
</brief_description>
66
<description>
7-
[TileData] object represents a single tile in a [TileSet]. It is usually edited using the tileset editor, but it can be modified at runtime using [method TileMap._tile_data_runtime_update].
7+
[TileData] object represents a single tile in a [TileSet]. It is usually edited using the tileset editor, but it can be modified at runtime using [method TileMapLayer._tile_data_runtime_update].
88
</description>
99
<tutorials>
1010
</tutorials>
@@ -301,7 +301,7 @@
301301
Vertical point of the tile used for determining y-sorted order.
302302
</member>
303303
<member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
304-
Ordering index of this tile, relative to [TileMap].
304+
Ordering index of this tile, relative to [TileMapLayer].
305305
</member>
306306
</members>
307307
<signals>

doc/classes/TileSet.xml

+5-8
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,7 @@
491491
<param index="5" name="alternative_to" type="int" />
492492
<description>
493493
Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers.
494-
This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
495-
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
494+
Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
496495
</description>
497496
</method>
498497
<method name="set_coords_level_tile_proxy">
@@ -503,8 +502,7 @@
503502
<param index="3" name="coords_to" type="Vector2i" />
504503
<description>
505504
Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
506-
This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
507-
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
505+
Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
508506
</description>
509507
</method>
510508
<method name="set_custom_data_layer_name">
@@ -602,8 +600,7 @@
602600
<param index="1" name="source_to" type="int" />
603601
<description>
604602
Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies.
605-
This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available.
606-
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
603+
Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
607604
</description>
608605
</method>
609606
<method name="set_terrain_color">
@@ -635,7 +632,7 @@
635632
</methods>
636633
<members>
637634
<member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0">
638-
For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the TileMap grid.
635+
For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the [TileMapLayer] grid.
639636
</member>
640637
<member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0">
641638
For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis.
@@ -656,7 +653,7 @@
656653
</constant>
657654
<constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
658655
Diamond tile shape (for isometric look).
659-
[b]Note:[/b] Isometric [TileSet] works best if [TileMap] and all its layers have Y-sort enabled.
656+
[b]Note:[/b] Isometric [TileSet] works best if all sibling [TileMapLayer]s and their parent inheriting from [Node2D] have Y-sort enabled.
660657
</constant>
661658
<constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
662659
Rectangular tile shape with one row/column out of two offset by half a tile.

doc/classes/TileSetAtlasSource.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,12 @@
288288
Represents the size of the [enum TileAnimationMode] enum.
289289
</constant>
290290
<constant name="TRANSFORM_FLIP_H" value="4096">
291-
Represents cell's horizontal flip flag. Should be used directly with [TileMap] to flip placed tiles by altering their alternative IDs.
291+
Represents cell's horizontal flip flag. Should be used directly with [TileMapLayer] to flip placed tiles by altering their alternative IDs.
292292
[codeblock]
293-
var alternate_id = $TileMap.get_cell_alternative_tile(0, Vector2i(2, 2))
293+
var alternate_id = $TileMapLayer.get_cell_alternative_tile(Vector2i(2, 2))
294294
if not alternate_id &amp; TileSetAtlasSource.TRANSFORM_FLIP_H:
295295
# If tile is not already flipped, flip it.
296-
$TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)
296+
$TileMapLayer.set_cell(Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)
297297
[/codeblock]
298298
[b]Note:[/b] These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below:
299299
[codeblock]

doc/classes/TileSetScenesCollectionSource.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Exposes a set of scenes as tiles for a [TileSet] resource.
55
</brief_description>
66
<description>
7-
When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instantiate an associated scene at the cell's position in the TileMap.
8-
Scenes are instantiated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instantiate/free the scene accordingly.
7+
When placed on a [TileMapLayer], tiles from [TileSetScenesCollectionSource] will automatically instantiate an associated scene at the cell's position in the TileMapLayer.
8+
Scenes are instantiated as children of the [TileMapLayer] when it enters the tree. If you add/remove a scene tile in the [TileMapLayer] that is already inside the tree, the [TileMapLayer] will automatically instantiate/free the scene accordingly.
99
[b]Note:[/b] Scene tiles all occupy one tile slot and instead use alternate tile ID to identify scene index. [method TileSetSource.get_tiles_count] will always return [code]1[/code]. Use [method get_scene_tiles_count] to get a number of scenes in a [TileSetScenesCollectionSource].
1010
Use this code if you want to find the scene path at a given tile in [TileMapLayer]:
1111
[codeblocks]
@@ -113,7 +113,7 @@
113113
<param index="0" name="id" type="int" />
114114
<param index="1" name="packed_scene" type="PackedScene" />
115115
<description>
116-
Assigns a [PackedScene] resource to the scene tile with [param id]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap.
116+
Assigns a [PackedScene] resource to the scene tile with [param id]. This will fail if the scene does not extend [CanvasItem], as positioning properties are needed to place the scene on the [TileMapLayer].
117117
</description>
118118
</method>
119119
</methods>

0 commit comments

Comments
 (0)