Remove IMoveSpeedModifier in favor of events (#5212)

* Remove IMoveSpeedModifier

* fucking magboots

* yope

* rabiews
This commit is contained in:
mirrorcult
2021-11-07 22:17:35 -07:00
committed by GitHub
parent 3612d25539
commit 2d3077f560
26 changed files with 236 additions and 277 deletions

View File

@@ -8,37 +8,13 @@ using Robust.Shared.ViewVariables;
namespace Content.Shared.Nutrition.Components
{
[NetworkedComponent()]
public abstract class SharedHungerComponent : Component, IMoveSpeedModifier
public abstract class SharedHungerComponent : Component
{
public sealed override string Name => "Hunger";
[ViewVariables]
public abstract HungerThreshold CurrentHungerThreshold { get; }
float IMoveSpeedModifier.WalkSpeedModifier
{
get
{
if (CurrentHungerThreshold == HungerThreshold.Starving)
{
return 0.75f;
}
return 1.0f;
}
}
float IMoveSpeedModifier.SprintSpeedModifier
{
get
{
if (CurrentHungerThreshold == HungerThreshold.Starving)
{
return 0.75f;
}
return 1.0f;
}
}
[Serializable, NetSerializable]
protected sealed class HungerComponentState : ComponentState
{