Skip to content

Commit

Permalink
No blood regen when starving/parched
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Oct 4, 2024
1 parent 88fca15 commit 9574ad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/Body/Systems/BloodstreamSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ private bool TryDoNaturalRegeneration(Entity<BloodstreamComponent> ent, Solution
// First, check if the entity has enough hunger/thirst
var hungerComp = CompOrNull<HungerComponent>(ent);
var thirstComp = CompOrNull<ThirstComponent>(ent);
if (usedHunger > 0 && hungerComp is not null && hungerComp.CurrentHunger < usedHunger
|| usedThirst > 0 && thirstComp is not null && thirstComp.CurrentThirst < usedThirst)
if (usedHunger > 0 && hungerComp is not null && (hungerComp.CurrentHunger < usedHunger || hungerComp.CurrentThreshold <= HungerThreshold.Starving)
|| usedThirst > 0 && thirstComp is not null && (thirstComp.CurrentThirst < usedThirst || thirstComp.CurrentThirstThreshold <= ThirstThreshold.Parched))
return false;

// Then actually expend hunger and thirst (if necessary) and regenerate blood.
Expand Down

0 comments on commit 9574ad1

Please sign in to comment.