Improved satiation (#2055)

* Natural satiation decreasing
Graphic showing satiation when eating (usually)

* Reworking values to match original

* Little fixes

* Satiation bar matches real values
Revival correctly updates bar

* Greatly simplify handling
Some fixes

* Inline variables
Add TODO for bug

* Satiation works correctly
Finally it all works as intended

* Remove unnecessary packets

* Improve satiation reduction handling
This commit is contained in:
Thoronium
2023-02-15 17:32:59 -07:00
committed by GitHub
parent b4b8f1ec38
commit 1b2210f5a7
10 changed files with 1772 additions and 14 deletions

View File

@@ -785,7 +785,7 @@ public class InventorySystem extends BaseGameSystem {
if (event.isCanceled()) return false;
float satiationIncrease = satiationParams[0] + ((float)satiationParams[1])/params.targetAvatar.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP);
if (!params.targetAvatar.addSatiation(satiationIncrease)) { // Make sure avatar can eat
if (!params.player.getSatiationManager().addSatiation(params.targetAvatar, satiationIncrease, itemData.getId())) { // Make sure avatar can eat
return false;
}
}