-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Hunger display is broken again #75162
Comments
Can confirm same behaviour, traceable to same change/experimental. |
@RenechCDDA can you check pls? I pinged you a several times, but dont have any respond |
@RenechCDDA can you answer something? Because the thing was worked fine before changes in your pr, and I pinged you several times in this pr, but have no answer |
I assume the error is in this line: Line 344 in 8bd4c5d
It should be: -- return ( calorie_deficit && fullness_ratio >= 11.0 / 20.0 ) || ( fullness_ratio >= 3.0 / 4.0 );
++ return ( calorie_deficit && fullness_ratio >= 3.0 / 4.0 ) || ( fullness_ratio >= 11.0 / 20.0 ); The second possible candidate:
The second argument of these functions must have a value:
If I understand correctly, this is the volume of what you want to eat. Because then it is added to what you have already eaten and compared to the capacity. And with us, it's always 0ml. P.S. I don't understand the point of replacing if-then with functions that do the same thing. |
And here's a third candidate for the problem. Let's take a closer look at what these functions calculate: Line 337 in 8bd4c5d
If I understand it correctly, it is written like this:
But if But if it is And that brings us to the error in this part: Cataclysm-DDA/src/character_body.cpp Lines 1050 to 1051 in 8bd4c5d
The We get this effect when |
I would suggest checking out a fix like this: Line 337 in 8bd4c5d
-- return ( calorie_deficit && fullness_ratio >= 1.0 ) || ( fullness_ratio >= 5.0 / 6.0 );
++ return ( !calorie_deficit && fullness_ratio >= 5.0 / 6.0 ) || ( calorie_deficit && fullness_ratio >= 1.0 ); Line 344 in 8bd4c5d
-- return ( calorie_deficit && fullness_ratio >= 11.0 / 20.0 ) || ( fullness_ratio >= 3.0 / 4.0 );
++ return ( !calorie_deficit && fullness_ratio >= 11.0 / 20.0 ) || ( calorie_deficit && fullness_ratio >= 3.0 / 4.0 ) ; And it seems like it could be simplified to:
|
Describe the bug
@RenechCDDA in #74318 fixed food warning, but this cause the display of your hunger to be broken
Before this update, when you are full, you will have the next display
So you understand, that your character is full
But after #74318 was merged we have next display
And you go from "satisfied" to "engorged"
Attach save file
N/A
Steps to reproduce
Download https://github.com/CleverRaven/Cataclysm-DDA/releases/tag/cdda-experimental-2024-06-15-1417
Start game
Spawn apples
Eat and see hunger display working good
Download https://github.com/CleverRaven/Cataclysm-DDA/releases/tag/cdda-experimental-2024-06-15-1717 or the latest experimental https://github.com/CleverRaven/Cataclysm-DDA/releases/tag/cdda-experimental-2024-07-22-0629 (I tested both)
Start game
Spawn apples
Eat and see hunger display does not working good
Expected behavior
Hunger display working right
Screenshots
No response
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: