Sericulture fixes (#19193)

* redone

* I FUCKING HATE SPAWNING STUFF IN SHARED

* inheritdoc

* owo

* fly broken wings

* From a server event to just an event.

* more info

* a comment and a different comment

* Partial

* Emo's requested changes.

* wuh

* head ache

* they call me mean names (laugh track)
This commit is contained in:
PixelTK
2023-10-01 21:46:09 +01:00
committed by GitHub
parent d15b7dff42
commit dfda2dbd05
7 changed files with 195 additions and 124 deletions

View File

@@ -173,6 +173,17 @@ public sealed class HungerSystem : EntitySystem
return result;
}
/// <summary>
/// A check that returns if the entity is below a hunger threshold.
/// </summary>
public bool IsHungerBelowState(EntityUid uid, HungerThreshold threshold, float? food = null, HungerComponent? comp = null)
{
if (!Resolve(uid, ref comp))
return false; // It's never going to go hungry, so it's probably fine to assume that it's not... you know, hungry.
return GetHungerThreshold(comp, food) < threshold;
}
private bool GetMovementThreshold(HungerThreshold threshold)
{
switch (threshold)