Task/food hud (#19312)
* security HUD now shows a job icon on entities with a body * thirst goggles * set starting hud gear * fix build * remove from starting gear * remove * replace * fix thirst and hunger icons * update icons * space * space * ] * ] * fix build * fix comments * fix * spacing * field * move more namespaces * use AutoGenerateComponentState * comments * fix build * not all fields * comments * unpaused * fix Dirty warning --------- Co-authored-by: Slava0135 <super.novalskiy_0135@inbox.ru>
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
using Content.Shared.Alert;
|
||||
|
||||
namespace Content.Server.Nutrition.Components
|
||||
{
|
||||
[Flags]
|
||||
public enum ThirstThreshold : byte
|
||||
{
|
||||
// Hydrohomies
|
||||
Dead = 0,
|
||||
Parched = 1 << 0,
|
||||
Thirsty = 1 << 1,
|
||||
Okay = 1 << 2,
|
||||
OverHydrated = 1 << 3,
|
||||
}
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class ThirstComponent : Component
|
||||
{
|
||||
// Base stuff
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("baseDecayRate")]
|
||||
public float BaseDecayRate = 0.1f;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ActualDecayRate;
|
||||
|
||||
// Thirst
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public ThirstThreshold CurrentThirstThreshold;
|
||||
|
||||
public ThirstThreshold LastThirstThreshold;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("startingThirst")]
|
||||
public float CurrentThirst = -1f;
|
||||
|
||||
[DataField("thresholds")]
|
||||
public Dictionary<ThirstThreshold, float> ThirstThresholds { get; private set; } = new()
|
||||
{
|
||||
{ThirstThreshold.OverHydrated, 600.0f},
|
||||
{ThirstThreshold.Okay, 450.0f},
|
||||
{ThirstThreshold.Thirsty, 300.0f},
|
||||
{ThirstThreshold.Parched, 150.0f},
|
||||
{ThirstThreshold.Dead, 0.0f},
|
||||
};
|
||||
|
||||
public static readonly Dictionary<ThirstThreshold, AlertType> ThirstThresholdAlertTypes = new()
|
||||
{
|
||||
{ThirstThreshold.Thirsty, AlertType.Thirsty},
|
||||
{ThirstThreshold.Parched, AlertType.Parched},
|
||||
{ThirstThreshold.Dead, AlertType.Parched},
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user