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

Replace pf_special with a scoped enum (PathfindingFlag) and add more flags #76026

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

CLIDragon
Copy link
Contributor

@CLIDragon CLIDragon commented Aug 29, 2024

Summary

None

Purpose of change

The current flags do not support all functionalities required (e.g. whether a piece of terrain is sheltered or unsheltered), and lack granularity with e.g. GOESUPDOWN requiring extra checks for ramps, whether it goes up or goes down, and so forth.

Additionally, using a scoped enum is good practice and will hopefully prevent accidental misuse of the enum type.

Describe the solution

Part of #75945. The additional flags aren't presently used as they are intended to be part of a new pathfinding implementation.

I've assigned the RAMP flag to imply GOESUP and not GOESDOWN. I'm not sure if this is correct.

Describe alternatives you've considered

Testing

There have been exactly zero functionality changes. The new flags are compatible with the old ones, and have been swapped in where appropriate. If it compiles, it should run.

Additional context

@github-actions github-actions bot added the [C++] Changes (can be) made in C++. Previously named `Code` label Aug 29, 2024
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 29, 2024
@CLIDragon
Copy link
Contributor Author

Clang tidy failure is unrelated; this should be ready to merge.

The current flags do not support all functionalities required (e.g.
whether a piece of terrain is sheltered or unsheltered), and lack
granularity with e.g. GOESUPDOWN requiring extra checks for ramps,
whether it goes up or goes down, and so forth.

Additionally, using a scoped enum is good practice and will hopefully
prevent accidental misuse of the enum type.

Part of CleverRaven#75945. The additional flags aren't presently used as they are
intended to be part of a new pathfinding implementation.

Co-authored-by: prharvey <[email protected]>
@CLIDragon
Copy link
Contributor Author

Hopefully tests pass.

@CLIDragon
Copy link
Contributor Author

I have no idea how to read or fix the ASAN error. I think it's unrelated because it looks to be in ui code, but again, no idea. I would appreciate it if someone with more experience with ASAN could take a look.

@Maleclypse Maleclypse merged commit 09af300 into CleverRaven:master Sep 5, 2024
22 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants