Skip to content

Capitalize global navigation constants #105718

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Apr 24, 2025

While working on PR #89409 I couldn't help but commit some scope creep and capitalize these constants, but I don't want to overload that PR with so much so I moved this to a separate PR.

This PR:

  • Capitalizes all constants in servers/navigation/navigation_globals.h
  • Adds an underscore after NAV for readability. (the prefix is useful because in a few places it's using namespace'd).
  • Renames the 2D ones from NAVMESH to NAV_POLYGON.
  • Replace {} initialization with = initialization for simplicity.
  • Moves the range hint into where it's used in the server cpp files (each was only used once).
    • This also eradicates a usage of auto 🥳
  • Fix a few places in docs and error prints where NavigationMesh was used instead of NavigationPolygon.

Copy link
Contributor

@smix8 smix8 left a comment

Choose a reason for hiding this comment

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

Fine with the upper() renames but please revert most renames from navmesh to navpolygon. Those that are doc fixes and have the actual NavigationPolygon resource are fine but those for properties and general documentation should be just navmesh everyhwere. We try to have navmesh / navigation mesh for both 2d and 3d wherever possible to make code and doc sharing easier and clearer as polygons mean the actual polygons inside the navmesh. That there is a name collision with the 2d NavigationPolygon resources is unfortune but it is what it is.

@Repiteo Repiteo merged commit fd11686 into godotengine:master May 6, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented May 6, 2025

Thanks!

@aaronfranke aaronfranke deleted the nav-const-caps branch May 6, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants