CatStation/Content.Shared/Nutrition/Components/SatiationSpeedModifierComponent.cs
Centronias ee5a413134
Make satiation able to increase over time & reframe satiation not assuming it decays by default (#45244)
* flerp

* pr comments: mostly comment editting, but also add one missing dirty for alerts

* force basesateffect to run update on first load

* I have ridden the mighty moon worm

* oh good, it just didn't work before :)

* oop
2026-08-16 16:17:45 +00:00

21 lines
968 B
C#

using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Nutrition.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Nutrition.Components;
/// <summary>
/// This component causes its entity to have movement speed modifiers applied based on the entity's current satiations.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true),
Access(typeof(SatiationSpeedModifierSystem))]
public sealed partial class SatiationSpeedModifierComponent : Component
{
/// <summary>
/// Speed modifiers, expressed as <see cref="float"/>s, contained within <see cref="SatiationThresholds{T}"/>,
/// keyed by the <see cref="SatiationTypePrototype">satiation types</see> they are thresholds for.
/// </summary>
[DataField(required: true), AutoNetworkedField]
public Dictionary<ProtoId<SatiationTypePrototype>, SatiationThresholds<float>> Satiations = [];
}