Remove IMoveSpeedModifier in favor of events (#5212)
* Remove IMoveSpeedModifier * fucking magboots * yope * rabiews
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user