From 5cef0b12283f763f575d4055e76bb8f0f5b83b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lindert?= Date: Mon, 27 Jan 2025 21:50:45 +0100 Subject: [PATCH] drainable fix --- .../Fluids/EntitySystems/PuddleSystem.Transfers.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.Transfers.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.Transfers.cs index 04bbf55c581c..ca79d5396d1a 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.Transfers.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.Transfers.cs @@ -2,11 +2,14 @@ using Content.Shared.DragDrop; using Content.Shared.FixedPoint; using Content.Shared.Fluids; +using Content.Shared.Nutrition.EntitySystems; namespace Content.Server.Fluids.EntitySystems; public sealed partial class PuddleSystem { + [Dependency] private readonly OpenableSystem _openable = default!; + private void InitializeTransfers() { SubscribeLocalEvent(OnRefillableDragged); @@ -26,6 +29,12 @@ private void OnRefillableDragged(Entity entity, ref if (!_solutionContainerSystem.TryGetDumpableSolution((args.Target, dump, null), out var dumpableSoln, out var dumpableSolution)) return; + if (!_solutionContainerSystem.TryGetDrainableSolution(entity.Owner, out _, out _)) + return; + + if (_openable.IsClosed(entity)) + return; + bool success = true; if (dump.Unlimited) {