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

@@ -100,7 +100,7 @@ public sealed class FatExtractorSystem : EntitySystem
if (!TryComp<HungerComponent>(occupant, out var hunger))
return false;
if (hunger.CurrentHunger < component.NutritionPerSecond)
if (_hunger.GetHunger(hunger) < component.NutritionPerSecond)
return false;
if (hunger.CurrentThreshold < component.MinHungerThreshold && !HasComp<EmaggedComponent>(uid))