Show / Hide Table of Contents

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 Source

ActualDecayRate

The actual amount at which CurrentHunger decays. Affected by CurrentThreshold

Declaration
public float ActualDecayRate
Field Value
Type Description
System.Single
| Improve this Doc View Source

BaseDecayRate

The base amount at which CurrentHunger decays.

Declaration
public float BaseDecayRate
Field Value
Type Description
System.Single
| Improve this Doc View Source

CurrentHunger

The current hunger amount of the entity

Declaration
public float CurrentHunger
Field Value
Type Description
System.Single
| Improve this Doc View Source

CurrentThreshold

The current hunger threshold the entity is at

Declaration
public HungerThreshold CurrentThreshold
Field Value
Type Description
HungerThreshold
| Improve this Doc View Source

HungerThresholdAlerts

A dictionary relating hunger thresholds to corresponding alerts.

Declaration
public Dictionary<HungerThreshold, AlertType> HungerThresholdAlerts
Field Value
Type Description
Dictionary<HungerThreshold, AlertType>
| Improve this Doc View Source

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>
| Improve this Doc View Source

LastThreshold

The last threshold this entity was at. Stored in order to prevent recalculating

Declaration
public HungerThreshold LastThreshold
Field Value
Type Description
HungerThreshold
| Improve this Doc View Source

NextUpdateTime

The time when the hunger will update next.

Declaration
public TimeSpan NextUpdateTime
Field Value
Type Description
TimeSpan
| Improve this Doc View Source

StarvationDamage

Damage dealt when your current threshold is at HungerThreshold.Dead

Declaration
public DamageSpecifier StarvationDamage
Field Value
Type Description
DamageSpecifier
| Improve this Doc View Source

StarvingSlowdownModifier

The amount of slowdown applied when an entity is starving

Declaration
public float StarvingSlowdownModifier
Field Value
Type Description
System.Single
| Improve this Doc View Source

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>
| Improve this Doc View Source

UpdateRate

The time between each update.

Declaration
public TimeSpan UpdateRate
Field Value
Type Description
TimeSpan
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾