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

Migrate move mode and related code from player #34762

Merged
merged 2 commits into from
Oct 16, 2019

Conversation

ifreund
Copy link
Contributor

@ifreund ifreund commented Oct 15, 2019

Summary

SUMMARY: Infrastructure "Migrate move mode and related code from player."

Purpose of change

Work towards #34721

Describe the solution

  • Hoist the move_mode variable up to character since NPCs should crouch and run someday
  • Drop UI-related code down to avatar
  • Serialize/deserialize move_mode in the character functions
  • Tweak related code to accomadate the changes

Describe alternatives you've considered

Trying to clean up the code at the same time. Decided that it would be best to stick to the goal of killing the player class though.

Testing

  • Ran the automated test suite locally
  • Verified that the move mode still changes correctly in game
  • Verified that riding mounts still functions properly
  • Verified that move mode still persists through save/load

@ifreund ifreund added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Mechanics: Character / Player Character / Player mechanics labels Oct 15, 2019
@ifreund
Copy link
Contributor Author

ifreund commented Oct 15, 2019

Forgot to do an SDL build before pushing, should be fixed now.

 - Hoist the move_mode variable up to character since NPCs should crouch
   and run someday
 - Drop UI-related code down to avatar
 - Serialize/deserialize move_mode in the character functions
 - Tweak related code to accomadate the changes
This fixes compilation of SDL builds
@ifreund
Copy link
Contributor Author

ifreund commented Oct 15, 2019

Rebased to avoid conflict with recently merged #34770

@ZhilkinSerg ZhilkinSerg merged commit b7a73b1 into CleverRaven:master Oct 16, 2019
@ifreund ifreund deleted the move-mode-refactor branch October 16, 2019 10:11
Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this pull request Oct 22, 2019
* Migrate move mode and related code from player

 - Hoist the move_mode variable up to character since NPCs should crouch
   and run someday
 - Drop UI-related code down to avatar
 - Serialize/deserialize move_mode in the character functions
 - Tweak related code to accomadate the changes

* Migrate get_overlay_ids() to Character

This fixes compilation of SDL builds
Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this pull request Nov 5, 2019
* Migrate move mode and related code from player

 - Hoist the move_mode variable up to character since NPCs should crouch
   and run someday
 - Drop UI-related code down to avatar
 - Serialize/deserialize move_mode in the character functions
 - Tweak related code to accomadate the changes

* Migrate get_overlay_ids() to Character

This fixes compilation of SDL builds
Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this pull request Nov 5, 2019
* Migrate move mode and related code from player

 - Hoist the move_mode variable up to character since NPCs should crouch
   and run someday
 - Drop UI-related code down to avatar
 - Serialize/deserialize move_mode in the character functions
 - Tweak related code to accomadate the changes

* Migrate get_overlay_ids() to Character

This fixes compilation of SDL builds
Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this pull request Nov 5, 2019
* Migrate move mode and related code from player

 - Hoist the move_mode variable up to character since NPCs should crouch
   and run someday
 - Drop UI-related code down to avatar
 - Serialize/deserialize move_mode in the character functions
 - Tweak related code to accomadate the changes

* Migrate get_overlay_ids() to Character

This fixes compilation of SDL builds
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` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants