Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upStomach #8419
Conversation
KA101
reviewed
Aug 3, 2014
| @@ -8242,12 +8256,16 @@ void player::consume_effects(item *eaten, it_comest *comest, bool rotten) | |||
| hunger -= ((comest->nutr) * 0.66); | |||
| thirst -= ((comest->quench) * 0.66); | |||
| health += ((comest->healthy) * 0.66); | |||
| stomach_food -= ((comest->nutr) *= 0.66); | |||
| stomach_water -= ((comest->quench) *= 0.66); | |||
This comment has been minimized.
This comment has been minimized.
KA101
Aug 3, 2014
Contributor
This would require a rewrite of GIZZARD, since the mutation indicates a smaller GI tract. I'd go with half-size stomach, rather than the reduced-input-value which I modeled in the original.
This comment has been minimized.
This comment has been minimized.
Reaper42
Aug 3, 2014
Author
Contributor
This stomach has no max size, if you about it.
Only one function implemented - vomit.
Reaper42
added some commits
Aug 3, 2014
This comment has been minimized.
This comment has been minimized.
|
Really cool concept, only two issues, one of which can happen later. The second issue is that if we're tracking stomach contents, it would be nice to have eating only put the contents in the stomach, and then only have that apply against hunger and thirst when it's digested, so vomiting doesn't make you lose nutrition, you haven't absorbed it yet, and you're just losing the contents of your stomach. This isn't critical for this PR and can be added later. |
This comment has been minimized.
This comment has been minimized.
|
I think about more realistic digestion simulation. But there is many hunger++ in code. I plan do it but not now. It very complex work, i think need to create class "body" and something like it. |
This comment has been minimized.
This comment has been minimized.
|
Yes it's rather involved, that's why I said the rate thing is the only critical thing for this PR. |
This comment has been minimized.
This comment has been minimized.
|
You just need max_stomach_size right? |
This comment has been minimized.
This comment has been minimized.
|
The most important thing is reducing the rate at which the stomach empties out. I proposed 50 units/10 turns, but anything in the ballpark of taking between one and two hours for a large meal to empty out of the stomach is fine. |
This comment has been minimized.
This comment has been minimized.
|
Now stomach empties out rate is 20% per 5 minutes. (50 turns). Min reduce is 10. |
This comment has been minimized.
This comment has been minimized.
|
Your logic is backwards, assume u.stomach_food == 1000:
I still think a constant emptying rate is a better approximation of reality short of tracking age of the food in the stomach, but fix it to be 20% instead of 80% per tick and I won't complain. |
This comment has been minimized.
This comment has been minimized.
|
Ouch. |
Reaper42
added some commits
Aug 5, 2014
This comment has been minimized.
This comment has been minimized.
|
I make fix. |
This comment has been minimized.
This comment has been minimized.
|
And...so what? |
This comment has been minimized.
This comment has been minimized.
|
I imagine Kevin's busy; I'm handling a lot of other Stuff at the moment so haven't been able to look into this one as much as I'd want to. Sorry. |
This comment has been minimized.
This comment has been minimized.
|
Works good. The gross things I made my test character do in order to test this PR shall never be spoken of again. |
Reaper42 commentedAug 3, 2014
See the code..