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;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-06-24 02:21:20 +02:00
|
|
|
using Robust.Shared.Serialization;
|
2021-01-12 21:24:11 +01:00
|
|
|
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
|
|
|
{
|
2021-07-12 01:32:10 -07:00
|
|
|
[NetworkedComponent()]
|
2021-11-07 22:17:35 -07:00
|
|
|
public abstract class SharedHungerComponent : Component
|
2020-06-24 02:21:20 +02:00
|
|
|
{
|
2021-01-12 21:24:11 +01: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; }
|
|
|
|
|
|
2021-07-12 01:32:10 -07:00
|
|
|
public HungerComponentState(HungerThreshold currentThreshold)
|
2020-06-24 02:21:20 +02:00
|
|
|
{
|
|
|
|
|
CurrentThreshold = currentThreshold;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-12 21:24:11 +01:00
|
|
|
[Serializable, NetSerializable]
|
2020-06-24 02:21:20 +02:00
|
|
|
public enum HungerThreshold : byte
|
|
|
|
|
{
|
|
|
|
|
Overfed,
|
|
|
|
|
Okay,
|
|
|
|
|
Peckish,
|
|
|
|
|
Starving,
|
|
|
|
|
Dead,
|
|
|
|
|
}
|
|
|
|
|
}
|