From 82bdd1c235084b5edfa1c29f3f2b4b84a4fc0ff7 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 21 Apr 2024 15:34:13 +0200 Subject: [PATCH] Update LayeredTileMapLayer's docs to work properly. --- .../doc_classes/LayeredTileMapLayer.xml | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/modules/layered_tile_map/doc_classes/LayeredTileMapLayer.xml b/modules/layered_tile_map/doc_classes/LayeredTileMapLayer.xml index e62c19182..ec0bbedc6 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileMapLayer.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileMapLayer.xml @@ -13,8 +13,8 @@ - - + + Called with a [TileData] object about to be used internally by the [TileMapLayer], allowing its modification at runtime. This method is only called if [method _use_tile_data_runtime_update] is implemented and returns [code]true[/code] for the given tile [param coords]. @@ -24,7 +24,7 @@ - + Should return [code]true[/code] if the tile at coordinates [param coords] requires a runtime update. [b]Warning:[/b] Make sure this function only returns [code]true[/code] when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. @@ -39,7 +39,7 @@ - + Erases the cell at coordinates [param coords]. @@ -52,28 +52,28 @@ - + Returns the tile alternative ID of the cell at coordinates [param coords]. - + Returns the tile atlas coordinates ID of the cell at coordinates [param coords]. Returns [code]Vector2i(-1, -1)[/code] if the cell does not exist. - + Returns the tile source ID of the cell at coordinates [param coords]. Returns [code]-1[/code] if the cell does not exist. - + Returns the [TileData] object associated with the given cell, or [code]null[/code] if the cell does not exist or is not a [TileSetAtlasSource]. [codeblock] @@ -89,7 +89,7 @@ - + Returns the coordinates of the tile for given physics body [RID]. Such an [RID] can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile. @@ -103,22 +103,22 @@ - - + + Returns the neighboring cell to the one at coordinates [param coords], identified by the [param neighbor] direction. This method takes into account the different layouts a TileMap can take. - + Creates and returns a new [TileMapPattern] from the given array of cells. See also [method set_pattern]. - + Returns the list of all neighboring cells to the one at [param coords]. @@ -131,9 +131,9 @@ - - - + + + Returns a [Vector2i] array with the positions of all cells containing a tile. Tiles may be filtered according to their source ([param source_id]), their atlas coordinates ([param atlas_coords]), or alternative id ([param alternative_tile]). If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default values, this method returns the same result as [method get_used_cells]. @@ -148,30 +148,30 @@ - + Returns whether the provided [param body] [RID] belongs to one of this [TileMapLayer]'s cells. - + Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node2D.to_local] before passing it to this method. See also [method map_to_local]. - - - + + + Returns for the given coordinates [param coords_in_pattern] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [param position_in_tilemap] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]. - + Returns the centered position of a cell in the [TileMapLayer]'s local coordinate space. To convert the returned value into global coordinates, use [method Node2D.to_global]. See also [method local_to_map]. [b]Note:[/b] This may not correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_origin] property of individual tiles. @@ -187,10 +187,10 @@ - - - - + + + + Sets the tile identifiers for the cell at coordinates [param coords]. Each tile of the [TileSet] is identified using three parts: - The source identifier [param source_id] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id], @@ -201,10 +201,10 @@ - - - - + + + + Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. @@ -213,10 +213,10 @@ - - - - + + + + Update all the cells in the [param path] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. @@ -225,15 +225,15 @@ - + Sets a custom [param map] as a [NavigationServer2D] navigation map. If not set, uses the default [World2D] navigation map instead. - - + + Pastes the [TileMapPattern] at the given [param position] in the tile map. See also [method get_pattern]. @@ -268,7 +268,7 @@ The quadrant size does not apply on a Y-sorted [TileMapLayer], as tiles are be grouped by Y position instead in that case. [b]Note:[/b] As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the [TileMapLayer]'s local coordinate system. - + The raw tile map data as a byte array.