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

coordRange df::coord iterator for Maps module #4596

Open
Bumber64 opened this issue May 16, 2024 · 0 comments · May be fixed by #4675
Open

coordRange df::coord iterator for Maps module #4596

Bumber64 opened this issue May 16, 2024 · 0 comments · May be fixed by #4675

Comments

@Bumber64
Copy link
Contributor

Bumber64 commented May 16, 2024

Define a df::coord iterator coordRange for the Maps module, similar to Units module's citizensRange.

This should iterate all df::coords contained in a cuboid defined by two given df::coords. We might decide to not check if the input coords lie in the current loaded map bounds, because the function could be used to iterate block, region, etc., coords. (We can have a version that accepts a df::coord2d by setting z to 0 and returning the appropriate type.)

We can also accept a cuboid struct (#4595) and make use of it to simplify the iterator (rather than figure out which direction we need to iterate x/y/z.)

@Bumber64 Bumber64 linked a pull request Jun 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant