-
Notifications
You must be signed in to change notification settings - Fork 293
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
[DDA Port] Overmap point refactoring + some bugfixes #1053
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 3234649478f9252beff6551d0cf731fafd028951)
Put the new point types through their paces by changing the types for overmap and overmapbuffer, and dealing with all the consequent fallout. Involves more changes than I originally anticipated, but serves as a good demonstration of the new point type features. Fixed some bugs along the way that were discovered by this new point type safety. The ones I remember are: * The evacuation shelter now correctly calculates the distance and direction to the refugee center, previously it was mostly nonsense (this only affects the message it prints out). * Weather conditions for NPC-planted crops are calculated more reasonably. Previously they were passing an overmap location as a map-square location, which could have caused all sorts of strangeness. * Translocators were similarly confusing map_square and overmap_terrain scales, so they might not have been working properly. * Two places were using map::points_in_radius which truncates to the map boundaries, but were using it for overmap-scale points, so it would only have worked correctly for some regions of the overmap. (cherry picked from commit 3c67e804d7ba0095fc71c09df6abd487ce785b00)
Refactoring in #41693 accidentally introduced an out-of-bounds array access in overmapbuffer::scents_near. Fix it. (cherry picked from commit 3783a24141951d82647b61dc8863dcce29bf2a45)
When working on #41693 I totally forgot that I'd added shorter names for the various coord::scale values to use in project_to etc. without being so verbose. This makes the API more consistent because the names of the scales match the abbreviations in the type names. Convert to the shorter names. Strictly a find-and-replace commit, so hopefully should be safe. (cherry picked from commit ab7a370c5055857c7c817a6815cf2e5086b6dfa9)
8623532
to
5b52c98
Compare
Ready. |
I'm testing many PRs at once, so it may be some other thing, but I'm getting debugmsgs about labs in my save. |
Alright, it seems to be an one-time thing. Couldn't replicate it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Port of DDA overmap point refactor CleverRaven/Cataclysm-DDA#41693, which should be the last major blocker on the road to the SDL overmap.
Includes related PRs:
CleverRaven/Cataclysm-DDA#41787
CleverRaven/Cataclysm-DDA#45291
CleverRaven/Cataclysm-DDA#42317
Bugs fixed by the original PR:
Additionally fixed faction camp distribution of food in containers: litter placement mixed up coord types, which caused food containers to be placed outside map boundaries, which triggered debugmsgs ever since #562. Changed it so distrubuting food now takes food out and leaves containers in place.
TODO: