Files
crystall-punk-14/Content.Shared/Nutrition/Components/SharedHungerComponent.cs

38 lines
952 B
C#
Raw Normal View History

2020-06-24 02:21:20 +02:00
using System;
2021-06-09 22:19:39 +02:00
using Content.Shared.Movement.Components;
2020-06-24 02:21:20 +02:00
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
2020-06-24 02:21:20 +02:00
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
2020-06-24 02:21:20 +02:00
2021-06-09 22:19:39 +02:00
namespace Content.Shared.Nutrition.Components
2020-06-24 02:21:20 +02:00
{
[NetworkedComponent()]
public abstract class SharedHungerComponent : Component
2020-06-24 02:21:20 +02:00
{
[ViewVariables]
2020-06-24 02:21:20 +02:00
public abstract HungerThreshold CurrentHungerThreshold { get; }
[Serializable, NetSerializable]
protected sealed class HungerComponentState : ComponentState
{
public HungerThreshold CurrentThreshold { get; }
public HungerComponentState(HungerThreshold currentThreshold)
2020-06-24 02:21:20 +02:00
{
CurrentThreshold = currentThreshold;
}
}
}
[Serializable, NetSerializable]
2020-06-24 02:21:20 +02:00
public enum HungerThreshold : byte
{
Overfed,
Okay,
Peckish,
Starving,
Dead,
}
}