From 7650ddf78f15cac3e3514538818eddf5ac243631 Mon Sep 17 00:00:00 2001 From: Jessica M Date: Wed, 3 Aug 2022 17:47:14 -0700 Subject: [PATCH] You can no longer spill closed solution containers (#10259) --- Content.Server/Fluids/EntitySystems/SpillableSystem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Server/Fluids/EntitySystems/SpillableSystem.cs b/Content.Server/Fluids/EntitySystems/SpillableSystem.cs index 8d043e1ff6..3b84f28253 100644 --- a/Content.Server/Fluids/EntitySystems/SpillableSystem.cs +++ b/Content.Server/Fluids/EntitySystems/SpillableSystem.cs @@ -4,6 +4,8 @@ using Content.Server.Administration.Logs; using Content.Server.Chemistry.EntitySystems; using Content.Server.Clothing.Components; using Content.Server.Fluids.Components; +using Content.Server.Nutrition.Components; +using Content.Server.Nutrition.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using Content.Shared.Database; @@ -111,6 +113,9 @@ public sealed class SpillableSystem : EntitySystem if (!_solutionContainerSystem.TryGetDrainableSolution(args.Target, out var solution)) return; + if (TryComp(args.Target, out var drink) && (!drink.Opened)) + return; + if (solution.DrainAvailable == FixedPoint2.Zero) return;