Skip to content

Commit

Permalink
Make TileMapLayers extend Node2D and work as children of TileMap
Browse files Browse the repository at this point in the history
  • Loading branch information
groud committed Jan 17, 2024
1 parent 107f296 commit 48bed50
Show file tree
Hide file tree
Showing 11 changed files with 1,112 additions and 1,076 deletions.
1 change: 1 addition & 0 deletions editor/icons/TileMapLayer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions misc/extension_api_validation/4.2-stable.expected
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_u
Barrier arguments have been removed from all relevant functions as they're no longer required.
Draw and compute list overlap no longer needs to be specified.
Initial and final actions have been simplified into fewer options.


GH-87115
--------
Validate extension JSON: Error: Field 'classes/TileMap/methods/get_collision_visibility_mode': is_const changed value in new API, from false to true.
Validate extension JSON: Error: Field 'classes/TileMap/methods/get_navigation_visibility_mode': is_const changed value in new API, from false to true.

Two TileMap getters were made const. No adjustments should be necessary.
10 changes: 10 additions & 0 deletions scene/2d/tile_map.compat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,20 @@ int TileMap::_get_quadrant_size_compat_81070() const {
return get_rendering_quadrant_size();
}

TileMap::VisibilityMode TileMap::_get_collision_visibility_mode_bind_compat_87115() {
return get_collision_visibility_mode();
}

TileMap::VisibilityMode TileMap::_get_navigation_visibility_mode_bind_compat_87115() {
return get_navigation_visibility_mode();
}

void TileMap::_bind_compatibility_methods() {
ClassDB::bind_compatibility_method(D_METHOD("get_used_rect"), &TileMap::_get_used_rect_bind_compat_78328);
ClassDB::bind_compatibility_method(D_METHOD("set_quadrant_size", "quadrant_size"), &TileMap::_set_quadrant_size_compat_81070);
ClassDB::bind_compatibility_method(D_METHOD("get_quadrant_size"), &TileMap::_get_quadrant_size_compat_81070);
ClassDB::bind_compatibility_method(D_METHOD("get_collision_visibility_mode"), &TileMap::_get_collision_visibility_mode_bind_compat_87115);
ClassDB::bind_compatibility_method(D_METHOD("get_navigation_visibility_mode"), &TileMap::_get_navigation_visibility_mode_bind_compat_87115);
}

#endif
Loading

0 comments on commit 48bed50

Please sign in to comment.