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

Support more neighbours in jmapgen_nested #51804

Merged

Conversation

jbytheway
Copy link
Contributor

Summary

Infrastructure "Support more neighbours in jmapgen_nested for mapgen that depends on diagonal adjacency"

Purpose of change

In some cases to make mapgen work well requires knowing your diagonal neighbours as well as cardinal ones.

Requested by @John-Candlebury.

Describe the solution

Previously only the cardinal directions and above were supported; now all eight horizontal neighbours, above, and below are.

Simplified the implementation of neighborhood_check at the same time.

Describe alternatives you've considered

Supporting diagonal non-horizontal neighbours too (like above_north) but I don't think we have a use case for such as yet.

Testing

I tweaked the definition of Aftershock's formless ruins to experiment, and it seems to work as expected.

Additional context

@John-Candlebury if you'd like to thank me for this feature, then feel free to write some documentation for the "neighbours" feature. I don't think there's any mention of it in the docs at all right now.

@actual-nh actual-nh added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Sep 22, 2021
Previously only the cardinal directions and above were supported; now
all eight horizontal neighbours, above, and below are.
@jbytheway jbytheway force-pushed the diagonal_neighbours_in_mapgen branch from f12a7e7 to 3d4620d Compare September 24, 2021 01:30
@kevingranade kevingranade merged commit fe944d5 into CleverRaven:master Sep 24, 2021
svenstaro pushed a commit to svenstaro/Cataclysm-DDA that referenced this pull request Sep 24, 2021
Previously only the cardinal directions and above were supported; now
all eight horizontal neighbours, above, and below are.
@jbytheway jbytheway deleted the diagonal_neighbours_in_mapgen branch September 24, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants