Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to merge the branch condition into the next branch, otherwise people may see "Hungry/Very Hungry" when they would have see "Peckish" before this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I carefully analyzed that, and that's also why I outlined the testing I did.
As far as I can tell, "Peckish" only ever kicked in instead of no message, so now it should just go to no message as intended. Also this logic had gotten significantly over-complicated.
If you're hungry and start eating, you should still see hungry until either 15 minutes have passed OR you reach 3 / 8 stomach fullness.
If you're full and passing time as your stomach empties out, it should go from "Sated" to no message, then to Hungry.
If you're hungry and eat a small snack, it should go from hungry to no message and back to hungry, unless the snack is so small that your stomach empties out within 15 minutes, in which case it never budges from hungry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
just_ate
is true, "Peckish" may kick in but no message may not. For example, if the stomach content is between 1/8 and 3/8, and time since last ate is larger than 0.25 hrs, then no hunger message is displayed. If at this time the player eats something small (such as a pill of aspirin?), then time since last ate becomes 0 and stomach content is still below 3/8. Before this change "Peckish" would have been displayed, and after this change "Hungry" would be displayed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going from no message to "peckish" when you eat and going from no message to "hungry" when you eat are both bugs, so restoring the old behaviour isn't a fix.
The only pertinent part of that logic is "just ate", everything else is redundant. The problem is, if we don't exclude "just ate" from the no message case, then "hungry" will always disappear immediately upon you eating anything, which is most likely going to make people think "eat one thing and then stop" is what the game wants them to do.
I can't see any way to resolve this without overhauling the whole thing, the scenario of "eating a tic-tack when your stomach is almost empty makes the game say you're hungry" is unintended, but it's the least bad alternative I can see, and it's no worse than the status quo.