Reduce network burden of the hunger system (#32986)

* reduce network burden of the hunger system

* explicit start + last updated

* remove auto reformat changes to otherwise untouched code

add clamp helper

* imagine making breaking changes, documenting them, and then not thinking to check the yaml

* comments

* Remove unused net manager in hunger system
Remove lastAuthoritativeHungerValue from prototypes
This commit is contained in:
Centronias
2024-12-18 05:06:02 -08:00
committed by GitHub
parent 87f39af1cf
commit 6b99493e80
9 changed files with 79 additions and 32 deletions

View File

@@ -84,7 +84,7 @@ public sealed class EggLayerSystem : EntitySystem
// Allow infinitely laying eggs if they can't get hungry.
if (TryComp<HungerComponent>(uid, out var hunger))
{
if (hunger.CurrentHunger < egglayer.HungerUsage)
if (_hunger.GetHunger(hunger) < egglayer.HungerUsage)
{
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-too-hungry"), uid, uid);
return false;