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

Move activate_mutation and deactivate_mutation to Character #35227

Merged
merged 10 commits into from
Nov 8, 2019

Conversation

Fris0uman
Copy link
Contributor

@Fris0uman Fris0uman commented Nov 1, 2019

Summary

SUMMARY: Infrastructure "Move activate_mutation and deactivate_mutation to Character"

Purpose of change

Part of #34721

  • has_enough_charges
  • consume_charges
  • invoke_item
  • print_health
  • activate_mutation
  • deactivate_mutation

Describe the solution

Describe alternatives you've considered

Testing

Compile without error

Additional context

@curstwist curstwist added [C++] Changes (can be) made in C++. Previously named `Code` Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies labels Nov 1, 2019
return invoke_item( used, use_methods.begin()->first, pt );
}

uilist umenu;
Copy link
Member

@KorGgenT KorGgenT Nov 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything with a uilist really should be in avatar. that means this function(the other three should stay) should get something basic in Character and the real function in avatar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function is used by npc, and since the overload with the uilist calls the other overload I don't think I can only move that one.

@KorGgenT
Copy link
Member

KorGgenT commented Nov 2, 2019

maybe add another commit that goes through all of the auto in the code you touched and change the ones that are not iterators or lambdas?

return invoke_item( used, pos() );
}

bool Character::invoke_item( item *used, const tripoint &pt )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool Character::invoke_item( item *used, const tripoint &pt )
bool Character::invoke_item( item *, const tripoint &pt )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget removing pt too

@ZhilkinSerg ZhilkinSerg merged commit 5a117d8 into CleverRaven:master Nov 8, 2019
@Fris0uman Fris0uman deleted the move_actiiva branch November 8, 2019 09:47
AMurkin pushed a commit to AMurkin/Cataclysm-DDA that referenced this pull request Nov 13, 2019
AMurkin added a commit to AMurkin/Cataclysm-DDA that referenced this pull request Nov 13, 2019
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` Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants