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

Finish making consume take time #40177

Merged
merged 12 commits into from
May 11, 2020

Conversation

Ramza13
Copy link
Contributor

@Ramza13 Ramza13 commented May 5, 2020

Summary

SUMMARY: Features "Finish making consume take time"

Purpose of change

Fixes #36972
Add rest of features to consumption taking time.

Describe the solution

Mutations can now alter eat/drink speeds and I moved the existing mutation based eat time logic into json. The consume menu now shows consume time. Drug's and medicine have had their consume times broken out. To fix auto eat/drink I made them simply instant.

Describe alternatives you've considered

The linked PR suggested showing percentages of completion but someone else is doing a generic solution for that so I left it undone. The drug/medicine times are what sounded good to me and I welcome suggestions to tweak them. Making auto eat/drink take time as well but the prospect of pausing the current activity to start another and then resume didn't seem worth it considering consume times are tiny compared to the crafting time.

Testing

Additional context

@mlangsdorf mlangsdorf added Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics labels May 5, 2020
@rsulli55
Copy link
Contributor

rsulli55 commented May 5, 2020

Because #40126 was recently merged, if you want this activity to be resumable you will need to add an override toactivity_actor::can_resume_with_internal .

@Ramza13
Copy link
Contributor Author

Ramza13 commented May 6, 2020

Because #40126 was recently merged, if you want this activity to be resumable you will need to add an override toactivity_actor::can_resume_with_internal .

That's probably a good idea but after my previous git misadventures I'm going to wait until this is merged first.

@rsulli55
Copy link
Contributor

rsulli55 commented May 6, 2020

Because #40126 was recently merged, if you want this activity to be resumable you will need to add an override toactivity_actor::can_resume_with_internal .

That's probably a good idea but after my previous git misadventures I'm going to wait until this is merged first.

Sounds good, being newish to git myself I definitely understand that.

@kevingranade
Copy link
Member

I don't know how, but this breaks some crafting tests.

@Ramza13 Ramza13 force-pushed the consume_correct_plus_plus branch from d928384 to b3ce428 Compare May 8, 2020 19:15
@anothersimulacrum
Copy link
Member

Could you change that Finishes to Fixes so that issue is automatically closed when this PR is merged?

@Ramza13
Copy link
Contributor Author

Ramza13 commented May 9, 2020

Ok tests should be fixed and I added in the can_resume_with_internal override

@kevingranade kevingranade merged commit 6913049 into CleverRaven:master May 11, 2020
@Ramza13 Ramza13 deleted the consume_correct_plus_plus branch May 11, 2020 02:06
fengjixuchui added a commit to fengjixuchui/Cataclysm-DDA that referenced this pull request May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make eating take time
5 participants