Fix hunger/thirst 'Dead' thresholds (#9453)
This commit is contained in:
@@ -64,6 +64,7 @@ namespace Content.Server.Nutrition.Components
|
||||
{ HungerThreshold.Overfed, AlertType.Overfed },
|
||||
{ HungerThreshold.Peckish, AlertType.Peckish },
|
||||
{ HungerThreshold.Starving, AlertType.Starving },
|
||||
{ HungerThreshold.Dead, AlertType.Starving },
|
||||
};
|
||||
|
||||
public void HungerThresholdEffect(bool force = false)
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace Content.Server.Nutrition.Components
|
||||
{ThirstThreshold.OverHydrated, AlertType.Overhydrated},
|
||||
{ThirstThreshold.Thirsty, AlertType.Thirsty},
|
||||
{ThirstThreshold.Parched, AlertType.Parched},
|
||||
{ThirstThreshold.Dead, AlertType.Parched},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
|
||||
private void OnRefreshMovespeed(EntityUid uid, ThirstComponent component, RefreshMovementSpeedModifiersEvent args)
|
||||
{
|
||||
var mod = (component.CurrentThirstThreshold & (ThirstThreshold.Parched | ThirstThreshold.Dead)) != 0x0 ? 0.75f : 1.0f;
|
||||
var mod = component.CurrentThirstThreshold <= ThirstThreshold.Parched ? 0.75f : 1.0f;
|
||||
args.ModifySpeed(mod, mod);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user