Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TileMapLayer get surrounding cells description #98587

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

skyace65
Copy link
Contributor

Clarifies what cells are counted as neighbors. Closes godotengine/godot-docs#9779.

@skyace65 skyace65 added documentation cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 27, 2024
@skyace65 skyace65 added this to the 4.4 milestone Oct 27, 2024
@skyace65 skyace65 requested a review from a team as a code owner October 27, 2024 18:22
Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to send the review

@@ -120,7 +120,7 @@
<return type="Vector2i[]" />
<param index="0" name="coords" type="Vector2i" />
<description>
Returns the list of all neighboring cells to the one at [param coords].
Returns the list of all neighboring cells to the one at [param coords]. Any neighboring cell is one that is touching edges, so for a square cell 4 cells would be returned, for a hexagon 6 cells are returned.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although TileMapLayer's entire documentation is somewhat shoddy, if we want to go this route you may as well mention TileSet's tile_shape which affects this method directly, and perhaps get_neighbor_cell().

Even as is, there's something "awkward to read" about this description I can't quite put my finger on. I have no suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tile_shape could be referenced optionally. I don't think this reads particularly awkward.

Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine as is and pretty clear. :)

@AThousandShips AThousandShips changed the title Improve get surrounding cells description Improve TileMapLayer get surrounding cells description Nov 11, 2024
@Repiteo Repiteo merged commit 47e7fb4 into godotengine:master Nov 12, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 12, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_surrounding_cells in TileMapLayer should specify that it means surrounding in 4 directions not 8.
5 participants