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

[DDA Port] Map reference migration part 1 #1732

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

olanti-p
Copy link
Contributor

Summary

SUMMARY: Infrastructure "[DDA Port] Port code to use global getters instead of g->u and g->m"

Purpose of change

Reducing dependency on game.h and game class.

Describe the solution

This and following PRs are cherry-picks of corresponding DDA PRs.
This one is CleverRaven/Cataclysm-DDA#41358
The idea is to use get_map(), get_avatar() and get_player_character() instead of including game.h just for g->m or g->u.
Cherry-picks are done somewhat loosely (parts of commits are dropped, parts are adapted for BN) since the divergence is quite noticeable at this point, so some usages of g->u or g->m may remain in the changed files.

Describe alternatives you've considered

Doing this manually, but that would produce even more merge conflicts down the line.

Testing

Compiles locally. No behavior changes intended.

Additional context

These are bound to cause merge conflicts with other open PRs, so in case they're interfering I'm fine with these being put off in favor of other changes.

(cherry picked from commit b7cc0d2bdc683fcada8fa5c4e1a9d4d486442b6f)
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 this pull request may close these issues.

3 participants