Class HungerComponent
Inheritance
System.Object
HungerComponent
Namespace: Content.Shared.Nutrition.Components
Assembly: Content.Shared.dll
Syntax
public sealed class HungerComponent : Component
Fields
| Improve this Doc View SourceActualDecayRate
The actual amount at which CurrentHunger decays. Affected by CurrentThreshold
Declaration
public float ActualDecayRate
Field Value
Type | Description |
---|---|
System.Single |
BaseDecayRate
The base amount at which CurrentHunger decays.
Declaration
public float BaseDecayRate
Field Value
Type | Description |
---|---|
System.Single |
CurrentHunger
The current hunger amount of the entity
Declaration
public float CurrentHunger
Field Value
Type | Description |
---|---|
System.Single |
CurrentThreshold
The current hunger threshold the entity is at
Declaration
public HungerThreshold CurrentThreshold
Field Value
Type | Description |
---|---|
HungerThreshold |
HungerThresholdAlerts
A dictionary relating hunger thresholds to corresponding alerts.
Declaration
public Dictionary<HungerThreshold, AlertType> HungerThresholdAlerts
Field Value
Type | Description |
---|---|
Dictionary<HungerThreshold, AlertType> |
HungerThresholdDecayModifiers
A dictionary relating HungerThreshold to how much they modify BaseDecayRate.
Declaration
public Dictionary<HungerThreshold, float> HungerThresholdDecayModifiers
Field Value
Type | Description |
---|---|
Dictionary<HungerThreshold, System.Single> |
LastThreshold
The last threshold this entity was at. Stored in order to prevent recalculating
Declaration
public HungerThreshold LastThreshold
Field Value
Type | Description |
---|---|
HungerThreshold |
NextUpdateTime
The time when the hunger will update next.
Declaration
public TimeSpan NextUpdateTime
Field Value
Type | Description |
---|---|
TimeSpan |
StarvationDamage
Damage dealt when your current threshold is at HungerThreshold.Dead
Declaration
public DamageSpecifier StarvationDamage
Field Value
Type | Description |
---|---|
DamageSpecifier |
StarvingSlowdownModifier
The amount of slowdown applied when an entity is starving
Declaration
public float StarvingSlowdownModifier
Field Value
Type | Description |
---|---|
System.Single |
Thresholds
A dictionary relating HungerThreshold to the amount of CurrentHunger needed for each one
Declaration
public Dictionary<HungerThreshold, float> Thresholds
Field Value
Type | Description |
---|---|
Dictionary<HungerThreshold, System.Single> |
UpdateRate
The time between each update.
Declaration
public TimeSpan UpdateRate
Field Value
Type | Description |
---|---|
TimeSpan |