From 111805c03bd6a557e3d359ecc0699a5516b13935 Mon Sep 17 00:00:00 2001 From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Wed, 15 Oct 2025 01:08:00 +0200 Subject: [PATCH] Fix sericulture zombies (#40279) fix sericulture zombies --- Content.Shared/Sericulture/SericultureSystem.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Content.Shared/Sericulture/SericultureSystem.cs b/Content.Shared/Sericulture/SericultureSystem.cs index e6086e67c2..fb87c907f4 100644 --- a/Content.Shared/Sericulture/SericultureSystem.cs +++ b/Content.Shared/Sericulture/SericultureSystem.cs @@ -68,8 +68,8 @@ public abstract partial class SharedSericultureSystem : EntitySystem private void OnSericultureStart(EntityUid uid, SericultureComponent comp, SericultureActionEvent args) { - if (TryComp(uid, out var hungerComp) - && _hungerSystem.IsHungerBelowState(uid, + if (!TryComp(uid, out var hungerComp) + || _hungerSystem.IsHungerBelowState(uid, comp.MinHungerThreshold, _hungerSystem.GetHunger(hungerComp) - comp.HungerCost, hungerComp)) @@ -95,9 +95,9 @@ public abstract partial class SharedSericultureSystem : EntitySystem if (args.Cancelled || args.Handled || comp.Deleted) return; - if (TryComp(uid, + if (!TryComp(uid, out var hungerComp) // A check, just incase the doafter is somehow performed when the entity is not in the right hunger state. - && _hungerSystem.IsHungerBelowState(uid, + || _hungerSystem.IsHungerBelowState(uid, comp.MinHungerThreshold, _hungerSystem.GetHunger(hungerComp) - comp.HungerCost, hungerComp)) @@ -106,7 +106,7 @@ public abstract partial class SharedSericultureSystem : EntitySystem return; } - _hungerSystem.ModifyHunger(uid, -comp.HungerCost); + _hungerSystem.ModifyHunger(uid, -comp.HungerCost, hungerComp); if (!_netManager.IsClient) // Have to do this because spawning stuff in shared is CBT. {