mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00

* Add hunger and hunger bar - New functions added to Player struct in game.zig to use and heal hunger. - If an attempt is made to use more hunger than there is available, the player is killed. - Hunger bar uses placeholder icons. - Hunger bar is based on the health bar - Hunger bar is anchored to the left of the hotbar, rather than the right like the health bar. * Don't kill player when hunger runs out. - Don't use hunger when there's not enough to use - Allow for code to know if hunger was used, so that is can handle not having enough hunger. * New hunger textures * Desaturate the highlight a little * Return true if hunger was already true. * Fix formatting * Rename hunger to energy, and fix other issues. * Make energy synchronized between client and server Also removes the functions that add/remove energy on the game.Player struct * Run formatter * Fix incorrect formatting by formatter. * Remove AddHunger struct and addHunger function - Keep base operation so things like accessories and food can use it when syncing * Fix formatting again. --------- Co-authored-by: Carrie <carriecapp9@gmail.com>