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 SharedThirstComponent : Component
|
2020-06-24 02:21:20 +02:00
|
|
|
{
|
|
|
|
|
public sealed override string Name => "Thirst";
|
|
|
|
|
|
2021-01-12 21:24:11 +01:00
|
|
|
[ViewVariables]
|
2020-06-24 02:21:20 +02:00
|
|
|
public abstract ThirstThreshold CurrentThirstThreshold { get; }
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
protected sealed class ThirstComponentState : ComponentState
|
|
|
|
|
{
|
|
|
|
|
public ThirstThreshold CurrentThreshold { get; }
|
|
|
|
|
|
2021-07-12 01:32:10 -07:00
|
|
|
public ThirstComponentState(ThirstThreshold currentThreshold)
|
2020-06-24 02:21:20 +02:00
|
|
|
{
|
|
|
|
|
CurrentThreshold = currentThreshold;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-12 21:24:11 +01:00
|
|
|
[NetSerializable, Serializable]
|
2020-06-24 02:21:20 +02:00
|
|
|
public enum ThirstThreshold : byte
|
|
|
|
|
{
|
|
|
|
|
// Hydrohomies
|
|
|
|
|
OverHydrated,
|
|
|
|
|
Okay,
|
|
|
|
|
Thirsty,
|
|
|
|
|
Parched,
|
|
|
|
|
Dead,
|
|
|
|
|
}
|
|
|
|
|
}
|