summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGilles Roudière <gilles.roudiere@gmail.com>2021-05-07 15:41:39 +0200
committerGilles Roudière <gilles.roudiere@gmail.com>2021-05-07 18:06:17 +0200
commita3dda2df85bf3e3ef82dbe1c2377640b9f3fd9c0 (patch)
treecedf0a8411cfc773f63acb1bc702c4cf20008ac5 /doc
parentd81ea631d91bd282b823ab03d68123befe4027c0 (diff)
Rework the TileSet resource and TileMap nodes:
- Move most properties from TileMap to TileSet, - Make TileSet more flexible, supporting more feature (several collision layers, etc...), - Fusion both the TileMap and TileSet editor, - Implement TileSetSources, and thus a new way to index tiles in the TileSet, - Rework the TileSet and TileMap editors completely, - Implement an editor zoom widget (and use it in several places)
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/TileData.xml245
-rw-r--r--doc/classes/TileMap.xml278
-rw-r--r--doc/classes/TileSet.xml705
-rw-r--r--doc/classes/TileSetAtlasSource.xml207
-rw-r--r--doc/classes/TileSetSource.xml13
5 files changed, 636 insertions, 812 deletions
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
new file mode 100644
index 0000000000..e3bc910ab6
--- /dev/null
+++ b/doc/classes/TileData.xml
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileData" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_collision_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_shape_one_way_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_shape_shape" qualifiers="const">
+ <return type="Shape2D">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_shapes_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="layer_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_data_by_layer_id" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_navigation_polygon" qualifiers="const">
+ <return type="NavigationPolygon">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_occluder" qualifiers="const">
+ <return type="OccluderPolygon2D">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_peering_bit_terrain" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_collision_shape_one_way" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_collision_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shape_one_way">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <argument index="2" name="one_way" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shape_one_way_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <argument index="2" name="one_way_margin" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shape_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shape_index" type="int">
+ </argument>
+ <argument index="2" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_shapes_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="shapes_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_data_by_layer_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_navigation_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="navigation_polygon" type="NavigationPolygon">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_occluder">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer_id" type="int">
+ </argument>
+ <argument index="1" name="occluder_polygon" type="OccluderPolygon2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_peering_bit_terrain">
+ <return type="void">
+ </return>
+ <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor">
+ </argument>
+ <argument index="1" name="terrain" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_material" qualifiers="const">
+ <return type="ShaderMaterial">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="tile_set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="ShaderMaterial">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false">
+ </member>
+ <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
+ </member>
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ </member>
+ <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
+ </member>
+ <member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1">
+ </member>
+ <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false">
+ </member>
+ <member name="y_sort_origin" type="Vector2i" setter="set_y_sort_origin" getter="get_y_sort_origin" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
+ </member>
+ </members>
+ <signals>
+ <signal name="changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 205b342ba8..76d8f1840f 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -31,53 +31,46 @@
Clears cells that do not exist in the tileset.
</description>
</method>
- <method name="get_cell" qualifiers="const">
+ <method name="get_cell_alternative_tile" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
- <method name="get_cell_autotile_coord" qualifiers="const">
- <return type="Vector2">
+ <method name="get_cell_atlas_coords" qualifiers="const">
+ <return type="Vector2i">
</return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling.
</description>
</method>
- <method name="get_cellv" qualifiers="const">
+ <method name="get_cell_source_id" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="position" type="Vector2">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
+ <method name="get_neighbor_cell" qualifiers="const">
+ <return type="Vector2i">
</return>
- <argument index="0" name="bit" type="int">
+ <argument index="0" name="coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor">
</argument>
<description>
- Returns [code]true[/code] if the given collision layer bit is set.
</description>
</method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
+ <method name="get_surrounding_tiles">
+ <return type="Vector2i[]">
</return>
- <argument index="0" name="bit" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
<description>
- Returns [code]true[/code] if the given collision mask bit is set.
</description>
</method>
<method name="get_used_cells" qualifiers="const">
@@ -87,15 +80,6 @@
Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]).
</description>
</method>
- <method name="get_used_cells_by_index" qualifiers="const">
- <return type="Vector2i[]">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Returns an array of all cells with the given tile [code]index[/code].
- </description>
- </method>
<method name="get_used_rect">
<return type="Rect2">
</return>
@@ -103,155 +87,26 @@
Returns a rectangle enclosing the used (non-empty) tiles of the map.
</description>
</method>
- <method name="is_cell_transposed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the given cell is transposed, i.e. the X and Y axes are swapped.
- </description>
- </method>
- <method name="is_cell_x_flipped" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the given cell is flipped in the X axis.
- </description>
- </method>
- <method name="is_cell_y_flipped" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the given cell is flipped in the Y axis.
- </description>
- </method>
<method name="map_to_world" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="map_position" type="Vector2">
</argument>
- <argument index="1" name="ignore_half_ofs" type="bool" default="false">
- </argument>
<description>
- Returns the local position corresponding to the given tilemap (grid-based) coordinates.
- Optionally, the tilemap's half offset can be ignored.
</description>
</method>
<method name="set_cell">
<return type="void">
</return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="tile" type="int">
- </argument>
- <argument index="3" name="flip_x" type="bool" default="false">
- </argument>
- <argument index="4" name="flip_y" type="bool" default="false">
- </argument>
- <argument index="5" name="transpose" type="bool" default="false">
- </argument>
- <argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Sets the tile index for the cell given by a Vector2.
- An index of [code]-1[/code] clears the cell.
- Optionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile.
- [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
- If you need these to be immediately updated, you can call [method update_dirty_quadrants].
- Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:
- [codeblocks]
- [gdscript]
- func set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2()):
- # Write your custom logic here.
- # To call the default method:
- .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)
- [/gdscript]
- [csharp]
- public void SetCell(int x, int y, int tile, bool flipX = false, bool flipY = false, bool transpose = false, Vector2 autotileCoord = new Vector2())
- {
- // Write your custom logic here.
- // To call the default method:
- base.SetCell(x, y, tile, flipX, flipY, transpose, autotileCoord);
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
- <method name="set_cellv">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="tile" type="int">
- </argument>
- <argument index="2" name="flip_x" type="bool" default="false">
- </argument>
- <argument index="3" name="flip_y" type="bool" default="false">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <description>
- Sets the tile index for the given cell.
- An index of [code]-1[/code] clears the cell.
- Optionally, the tile can also be flipped or transposed.
- [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
- If you need these to be immediately updated, you can call [method update_dirty_quadrants].
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Sets the given collision layer bit.
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
+ <argument index="0" name="coords" type="Vector2i">
</argument>
- <argument index="1" name="value" type="bool">
+ <argument index="1" name="source_id" type="int" default="-1">
</argument>
- <description>
- Sets the given collision mask bit.
- </description>
- </method>
- <method name="update_bitmask_area">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates.
- </description>
- </method>
- <method name="update_bitmask_region">
- <return type="void">
- </return>
- <argument index="0" name="start" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )">
</argument>
- <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="3" name="alternative_tile" type="int" default="-1">
</argument>
<description>
- Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates).
- Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.
</description>
</method>
<method name="update_dirty_quadrants">
@@ -262,7 +117,7 @@
</description>
</method>
<method name="world_to_map" qualifiers="const">
- <return type="Vector2">
+ <return type="Vector2i">
</return>
<argument index="0" name="world_position" type="Vector2">
</argument>
@@ -272,110 +127,19 @@
</method>
</methods>
<members>
- <member name="bake_navigation" type="bool" setter="set_bake_navigation" getter="is_baking_navigation" default="false">
- If [code]true[/code], this TileMap bakes a navigation region.
- </member>
- <member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false">
- If [code]true[/code], the cell's UVs will be clipped.
- </member>
- <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" default="Transform2D( 64, 0, 0, 64, 0, 0 )">
- The custom [Transform2D] to be applied to the TileMap's cells.
- </member>
- <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset" default="2">
- Amount to offset alternating tiles. See [enum HalfOffset] for possible values.
- </member>
<member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16">
The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size.
</member>
- <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2( 64, 64 )">
- The TileMap's cell size.
- </member>
- <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0">
- Position for tile origin. See [enum TileOrigin] for possible values.
- </member>
- <member name="cell_y_sort" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
- If [code]true[/code], the TileMap's direct children will be drawn in order of their Y coordinate.
- </member>
- <member name="centered_textures" type="bool" setter="set_centered_textures" getter="is_centered_textures_enabled" default="false">
- If [code]true[/code], the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored.
- If [code]false[/code], the texture position start in the top-left corner unless [member compatibility_mode] is enabled.
- </member>
- <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
- Bounce value for static body collisions (see [code]collision_use_kinematic[/code]).
- </member>
- <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="1.0">
- Friction value for static body collisions (see [code]collision_use_kinematic[/code]).
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
- The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
- </member>
- <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false">
- If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body.
- </member>
- <member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false">
- If [code]true[/code], this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D].
- </member>
- <member name="compatibility_mode" type="bool" setter="set_compatibility_mode" getter="is_compatibility_mode_enabled" default="false">
- If [code]true[/code], the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing [code]flip_h[/code], [code]flip_v[/code] and [code]transpose[/code] tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.
- If [code]false[/code], the textures do not move when doing [code]flip_h[/code], [code]flip_v[/code] operations if no offset is used, nor when changing the tile origin.
- The compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures.
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode" default="0">
- The TileMap orientation mode. See [enum Mode] for possible values.
- </member>
- <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
- The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
- </member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
The assigned [TileSet].
</member>
</members>
<signals>
- <signal name="settings_changed">
+ <signal name="changed">
<description>
- Emitted when a tilemap setting has changed.
</description>
</signal>
</signals>
<constants>
- <constant name="INVALID_CELL" value="-1">
- Returned when a cell doesn't exist.
- </constant>
- <constant name="MODE_SQUARE" value="0" enum="Mode">
- Orthogonal orientation mode.
- </constant>
- <constant name="MODE_ISOMETRIC" value="1" enum="Mode">
- Isometric orientation mode.
- </constant>
- <constant name="MODE_CUSTOM" value="2" enum="Mode">
- Custom orientation mode.
- </constant>
- <constant name="HALF_OFFSET_X" value="0" enum="HalfOffset">
- Half offset on the X coordinate.
- </constant>
- <constant name="HALF_OFFSET_Y" value="1" enum="HalfOffset">
- Half offset on the Y coordinate.
- </constant>
- <constant name="HALF_OFFSET_DISABLED" value="2" enum="HalfOffset">
- Half offset disabled.
- </constant>
- <constant name="HALF_OFFSET_NEGATIVE_X" value="3" enum="HalfOffset">
- Half offset on the X coordinate (negative).
- </constant>
- <constant name="HALF_OFFSET_NEGATIVE_Y" value="4" enum="HalfOffset">
- Half offset on the Y coordinate (negative).
- </constant>
- <constant name="TILE_ORIGIN_TOP_LEFT" value="0" enum="TileOrigin">
- Tile origin at its top-left corner.
- </constant>
- <constant name="TILE_ORIGIN_CENTER" value="1" enum="TileOrigin">
- Tile origin at its center.
- </constant>
- <constant name="TILE_ORIGIN_BOTTOM_LEFT" value="2" enum="TileOrigin">
- Tile origin at its bottom-left corner.
- </constant>
</constants>
</class>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index adc5880c71..13c6b9070a 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -17,752 +17,347 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
- <method name="_forward_atlas_subtile_selection" qualifiers="virtual">
- <return type="Vector2">
- </return>
- <argument index="0" name="atlastile_id" type="int">
- </argument>
- <argument index="1" name="tilemap" type="Object">
- </argument>
- <argument index="2" name="tile_location" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="_forward_subtile_selection" qualifiers="virtual">
- <return type="Vector2">
- </return>
- <argument index="0" name="autotile_id" type="int">
- </argument>
- <argument index="1" name="bitmask" type="int">
- </argument>
- <argument index="2" name="tilemap" type="Object">
- </argument>
- <argument index="3" name="tile_location" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="_is_tile_bound" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="drawn_id" type="int">
- </argument>
- <argument index="1" name="neighbor_id" type="int">
- </argument>
- <description>
- Determines when the auto-tiler should consider two different auto-tile IDs to be bound together.
- [b]Note:[/b] [code]neighbor_id[/code] will be [code]-1[/code] ([constant TileMap.INVALID_CELL]) when checking a tile against an empty neighbor tile.
- </description>
- </method>
- <method name="autotile_clear_bitmask_map">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Clears all bitmask information of the autotile.
- </description>
- </method>
- <method name="autotile_get_bitmask">
+ <method name="add_source">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
+ <argument index="0" name="atlas_source_id_override" type="TileSetAtlasSource">
</argument>
- <description>
- Returns the bitmask of the subtile from an autotile given its coordinates.
- The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
- </description>
- </method>
- <method name="autotile_get_bitmask_mode" qualifiers="const">
- <return type="int" enum="TileSet.BitmaskMode">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="arg1" type="int" default="-1">
</argument>
<description>
- Returns the [enum BitmaskMode] of the autotile.
</description>
</method>
- <method name="autotile_get_icon_coordinate" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates.
- The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
- </description>
- </method>
- <method name="autotile_get_light_occluder" qualifiers="const">
- <return type="OccluderPolygon2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <description>
- Returns the light occluder of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_get_navigation_polygon" qualifiers="const">
- <return type="NavigationPolygon">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <description>
- Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the size of the subtiles in an atlas/autotile.
- </description>
- </method>
- <method name="autotile_get_spacing" qualifiers="const">
+ <method name="get_navigation_layer_layers" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Returns the spacing between subtiles of the atlas/autotile.
</description>
</method>
- <method name="autotile_get_subtile_priority">
+ <method name="get_next_source_id" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
<description>
- Returns the priority of the subtile from an autotile given its coordinates.
- When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
</description>
</method>
- <method name="autotile_get_z_index">
+ <method name="get_occlusion_layer_light_mask" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
+ <argument index="0" name="arg0" type="int">
</argument>
<description>
- Returns the drawing index of the subtile from an atlas/autotile given its coordinates.
</description>
</method>
- <method name="autotile_set_bitmask">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="bitmask" type="Vector2">
- </argument>
- <argument index="2" name="flag" type="int">
- </argument>
- <description>
- Sets the bitmask of the subtile from an autotile given its coordinates.
- The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
- </description>
- </method>
- <method name="autotile_set_bitmask_mode">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode">
- </argument>
- <description>
- Sets the [enum BitmaskMode] of the autotile.
- </description>
- </method>
- <method name="autotile_set_icon_coordinate">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <description>
- Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates.
- The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
- </description>
- </method>
- <method name="autotile_set_light_occluder">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="light_occluder" type="OccluderPolygon2D">
- </argument>
- <argument index="2" name="coord" type="Vector2">
- </argument>
- <description>
- Sets the light occluder of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_set_navigation_polygon">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navigation_polygon" type="NavigationPolygon">
- </argument>
- <argument index="2" name="coord" type="Vector2">
- </argument>
- <description>
- Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates.
- </description>
- </method>
- <method name="autotile_set_size">
- <return type="void">
+ <method name="get_occlusion_layer_sdf_collision" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="size" type="Vector2">
+ <argument index="0" name="arg0" type="int">
</argument>
<description>
- Sets the size of the subtiles in an atlas/autotile.
</description>
</method>
- <method name="autotile_set_spacing">
- <return type="void">
+ <method name="get_physics_layer_collision_layer" qualifiers="const">
+ <return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="spacing" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Sets the spacing between subtiles of the atlas/autotile.
</description>
</method>
- <method name="autotile_set_subtile_priority">
- <return type="void">
+ <method name="get_physics_layer_collision_mask" qualifiers="const">
+ <return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <argument index="2" name="priority" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Sets the priority of the subtile from an autotile given its coordinates.
- When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
</description>
</method>
- <method name="autotile_set_z_index">
- <return type="void">
+ <method name="get_physics_layer_physics_material" qualifiers="const">
+ <return type="PhysicsMaterial">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="coord" type="Vector2">
- </argument>
- <argument index="2" name="z_index" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
<description>
- Sets the drawing index of the subtile from an atlas/autotile given its coordinates.
</description>
</method>
- <method name="clear">
- <return type="void">
+ <method name="get_source" qualifiers="const">
+ <return type="TileSetSource">
</return>
- <description>
- Clears all tiles.
- </description>
- </method>
- <method name="create_tile">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Creates a new tile with the given ID.
</description>
</method>
- <method name="find_tile_by_name" qualifiers="const">
+ <method name="get_source_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
- </argument>
<description>
- Returns the first tile matching the given name.
</description>
</method>
- <method name="get_last_unused_tile_id" qualifiers="const">
+ <method name="get_source_id" qualifiers="const">
<return type="int">
</return>
- <description>
- Returns the ID following the last currently used ID, useful when creating a new tile.
- </description>
- </method>
- <method name="get_tiles_ids" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Returns an array of all currently used tile IDs.
- </description>
- </method>
- <method name="remove_tile">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Removes the given tile ID.
</description>
</method>
- <method name="tile_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape" type="Shape2D">
- </argument>
- <argument index="2" name="shape_transform" type="Transform2D">
- </argument>
- <argument index="3" name="one_way" type="bool" default="false">
- </argument>
- <argument index="4" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Adds a shape to the tile.
- </description>
- </method>
- <method name="tile_get_light_occluder" qualifiers="const">
- <return type="OccluderPolygon2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's light occluder.
- </description>
- </method>
- <method name="tile_get_material" qualifiers="const">
- <return type="ShaderMaterial">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's material.
- </description>
- </method>
- <method name="tile_get_modulate" qualifiers="const">
+ <method name="get_terrain_color" qualifiers="const">
<return type="Color">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's modulation color.
- </description>
- </method>
- <method name="tile_get_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's name.
- </description>
- </method>
- <method name="tile_get_navigation_polygon" qualifiers="const">
- <return type="NavigationPolygon">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <description>
- Returns the navigation polygon of the tile.
- </description>
- </method>
- <method name="tile_get_navigation_polygon_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
<description>
- Returns the offset of the tile's navigation polygon.
</description>
</method>
- <method name="tile_get_occluder_offset" qualifiers="const">
- <return type="Vector2">
+ <method name="get_terrain_name" qualifiers="const">
+ <return type="String">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <description>
- Returns the offset of the tile's light occluder.
- </description>
- </method>
- <method name="tile_get_region" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
<description>
- Returns the tile sub-region in the texture.
</description>
</method>
- <method name="tile_get_shape" qualifiers="const">
- <return type="Shape2D">
+ <method name="get_terrain_set_mode" qualifiers="const">
+ <return type="int" enum="TileSet.TerrainMode">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
<description>
- Returns a tile's given shape.
</description>
</method>
- <method name="tile_get_shape_count" qualifiers="const">
+ <method name="get_terrains_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the number of shapes assigned to a tile.
- </description>
- </method>
- <method name="tile_get_shape_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
<description>
- Returns the offset of a tile's shape.
</description>
</method>
- <method name="tile_get_shape_one_way" qualifiers="const">
+ <method name="has_source" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Returns the one-way collision value of a tile's shape.
- </description>
- </method>
- <method name="tile_get_shape_one_way_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_shape_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Returns the [Transform2D] of a tile's shape.
- </description>
- </method>
- <method name="tile_get_shapes" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns an array of dictionaries describing the tile's shapes.
- [b]Dictionary structure in the array returned by this method:[/b]
- [codeblock]
- {
- "autotile_coord": Vector2,
- "one_way": bool,
- "one_way_margin": int,
- "shape": CollisionShape2D,
- "shape_transform": Transform2D,
- }
- [/codeblock]
- </description>
- </method>
- <method name="tile_get_texture" qualifiers="const">
- <return type="Texture2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's texture.
- </description>
- </method>
- <method name="tile_get_texture_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the texture offset of the tile.
- </description>
- </method>
- <method name="tile_get_tile_mode" qualifiers="const">
- <return type="int" enum="TileSet.TileMode">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Returns the tile's [enum TileMode].
</description>
</method>
- <method name="tile_get_z_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the tile's Z index (drawing layer).
- </description>
- </method>
- <method name="tile_set_light_occluder">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="light_occluder" type="OccluderPolygon2D">
- </argument>
- <description>
- Sets a light occluder for the tile.
- </description>
- </method>
- <method name="tile_set_material">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="material" type="ShaderMaterial">
- </argument>
- <description>
- Sets the tile's material.
- </description>
- </method>
- <method name="tile_set_modulate">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Sets the tile's modulation color.
- </description>
- </method>
- <method name="tile_set_name">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- Sets the tile's name.
- </description>
- </method>
- <method name="tile_set_navigation_polygon">
+ <method name="remove_source">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navigation_polygon" type="NavigationPolygon">
+ <argument index="0" name="source_id" type="int">
</argument>
<description>
- Sets the tile's navigation polygon.
</description>
</method>
- <method name="tile_set_navigation_polygon_offset">
+ <method name="set_navigation_layer_layers">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="navigation_polygon_offset" type="Vector2">
+ <argument index="1" name="layers" type="int">
</argument>
<description>
- Sets an offset for the tile's navigation polygon.
</description>
</method>
- <method name="tile_set_occluder_offset">
+ <method name="set_occlusion_layer_light_mask">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="occluder_offset" type="Vector2">
+ <argument index="1" name="light_mask" type="int">
</argument>
<description>
- Sets an offset for the tile's light occluder.
</description>
</method>
- <method name="tile_set_region">
+ <method name="set_occlusion_layer_sdf_collision">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="region" type="Rect2">
+ <argument index="1" name="sdf_collision" type="int">
</argument>
<description>
- Sets the tile's sub-region in the texture. This is common in texture atlases.
</description>
</method>
- <method name="tile_set_shape">
+ <method name="set_physics_layer_collision_layer">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="2" name="shape" type="Shape2D">
+ <argument index="1" name="layer" type="int">
</argument>
<description>
- Sets a shape for the tile, enabling collision.
</description>
</method>
- <method name="tile_set_shape_offset">
+ <method name="set_physics_layer_collision_mask">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="2" name="shape_offset" type="Vector2">
+ <argument index="1" name="mask" type="int">
</argument>
<description>
- Sets the offset of a tile's shape.
</description>
</method>
- <method name="tile_set_shape_one_way">
+ <method name="set_physics_layer_physics_material">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="layer_index" type="int">
</argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <argument index="2" name="one_way" type="bool">
+ <argument index="1" name="physics_material" type="PhysicsMaterial">
</argument>
<description>
- Enables one-way collision on a tile's shape.
</description>
</method>
- <method name="tile_set_shape_one_way_margin">
+ <method name="set_source_id">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="0" name="source_id" type="int">
</argument>
- <argument index="2" name="one_way" type="float">
+ <argument index="1" name="arg1" type="int">
</argument>
<description>
</description>
</method>
- <method name="tile_set_shape_transform">
+ <method name="set_terrain_color">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="shape_id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
- <argument index="2" name="shape_transform" type="Transform2D">
+ <argument index="2" name="color" type="Color">
</argument>
<description>
- Sets a [Transform2D] on a tile's shape.
</description>
</method>
- <method name="tile_set_shapes">
+ <method name="set_terrain_name">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="shapes" type="Array">
- </argument>
- <description>
- Sets an array of shapes for the tile, enabling collision.
- </description>
- </method>
- <method name="tile_set_texture">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture2D">
- </argument>
- <description>
- Sets the tile's texture.
- </description>
- </method>
- <method name="tile_set_texture_offset">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
+ <argument index="1" name="terrain_index" type="int">
</argument>
- <argument index="1" name="texture_offset" type="Vector2">
+ <argument index="2" name="name" type="String">
</argument>
<description>
- Sets the tile's texture offset.
</description>
</method>
- <method name="tile_set_tile_mode">
+ <method name="set_terrain_set_mode">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="tilemode" type="int" enum="TileSet.TileMode">
+ <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode">
</argument>
<description>
- Sets the tile's [enum TileMode].
</description>
</method>
- <method name="tile_set_z_index">
+ <method name="set_terrains_count">
<return type="void">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="terrain_set" type="int">
</argument>
- <argument index="1" name="z_index" type="int">
+ <argument index="1" name="terrains_count" type="int">
</argument>
<description>
- Sets the tile's drawing index.
</description>
</method>
</methods>
+ <members>
+ <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0">
+ </member>
+ <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0">
+ </member>
+ <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0">
+ </member>
+ <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0">
+ </member>
+ <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0">
+ </member>
+ <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0">
+ </member>
+ <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0">
+ </member>
+ <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0">
+ </member>
+ <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i( 16, 16 )">
+ </member>
+ <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2( 0, 0 )">
+ </member>
+ <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false">
+ </member>
+ <member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false">
+ </member>
+ </members>
<constants>
- <constant name="BITMASK_2X2" value="0" enum="BitmaskMode">
+ <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape">
+ </constant>
+ <constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
+ </constant>
+ <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
+ </constant>
+ <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape">
+ </constant>
+ <constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout">
+ </constant>
+ <constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout">
+ </constant>
+ <constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis">
+ </constant>
+ <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor">
+ </constant>
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor">
</constant>
- <constant name="BITMASK_3X3_MINIMAL" value="1" enum="BitmaskMode">
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor">
</constant>
- <constant name="BITMASK_3X3" value="2" enum="BitmaskMode">
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor">
</constant>
- <constant name="BIND_TOPLEFT" value="1" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor">
</constant>
- <constant name="BIND_TOP" value="2" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor">
</constant>
- <constant name="BIND_TOPRIGHT" value="4" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor">
</constant>
- <constant name="BIND_LEFT" value="8" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor">
</constant>
- <constant name="BIND_CENTER" value="16" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor">
</constant>
- <constant name="BIND_RIGHT" value="32" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor">
</constant>
- <constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor">
</constant>
- <constant name="BIND_BOTTOM" value="128" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor">
</constant>
- <constant name="BIND_BOTTOMRIGHT" value="256" enum="AutotileBindings">
+ <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor">
</constant>
- <constant name="SINGLE_TILE" value="0" enum="TileMode">
+ <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode">
</constant>
- <constant name="AUTO_TILE" value="1" enum="TileMode">
+ <constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode">
</constant>
- <constant name="ATLAS_TILE" value="2" enum="TileMode">
+ <constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode">
</constant>
</constants>
</class>
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
new file mode 100644
index 0000000000..a7a304ca27
--- /dev/null
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="can_move_tile_in_atlas" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )">
+ </argument>
+ <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_tiles_outside_texture">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="create_alternative_tile">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_id_override" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="size" type="Vector2i" default="Vector2i( 1, 1 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_alternative_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_alternative_tiles_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_atlas_grid_size" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_next_alternative_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_at_coords" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_data" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_id" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_size_in_atlas" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tile_texture_region" qualifiers="const">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tiles_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_alternative_tile" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_tile" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_tiles_outside_texture">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_tile_in_atlas">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )">
+ </argument>
+ <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_alternative_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_alternative_tile_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas_coords" type="Vector2i">
+ </argument>
+ <argument index="1" name="alternative_tile" type="int">
+ </argument>
+ <argument index="2" name="new_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i( 0, 0 )">
+ </member>
+ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i( 16, 16 )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml
new file mode 100644
index 0000000000..6a3029bb3f
--- /dev/null
+++ b/doc/classes/TileSetSource.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileSetSource" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>