Files
tbd-station-14/Content.Shared/Nutrition/Components/SharedHungerComponent.cs
2022-07-05 20:08:57 -07:00

34 lines
868 B
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Nutrition.Components
{
[NetworkedComponent()]
public abstract class SharedHungerComponent : Component
{
[ViewVariables]
public abstract HungerThreshold CurrentHungerThreshold { get; }
[Serializable, NetSerializable]
protected sealed class HungerComponentState : ComponentState
{
public HungerThreshold CurrentThreshold { get; }
public HungerComponentState(HungerThreshold currentThreshold)
{
CurrentThreshold = currentThreshold;
}
}
}
[Serializable, NetSerializable]
public enum HungerThreshold : byte
{
Overfed = 1 << 3,
Okay = 1 << 2,
Peckish = 1 << 1,
Starving = 1 << 0,
Dead = 0,
}
}