From 31e58fe0157073421adbd29967e71d4f5715814e Mon Sep 17 00:00:00 2001 From: Justin Trotter Date: Thu, 3 Nov 2022 17:16:31 -0700 Subject: [PATCH] fix syringe overdrawing (#12298) --- .../Chemistry/EntitySystems/ChemistrySystem.Injector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs b/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs index caf2327af1..7b4a78d520 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs @@ -394,8 +394,8 @@ public sealed partial class ChemistrySystem return; } - // Get transfer amount. May be smaller than _transferAmount if not enough room - var realTransferAmount = FixedPoint2.Min(component.TransferAmount, targetSolution.DrawAvailable); + // Get transfer amount. May be smaller than _transferAmount if not enough room, also make sure there's room in the injector + var realTransferAmount = FixedPoint2.Min(component.TransferAmount, targetSolution.DrawAvailable, solution.AvailableVolume); if (realTransferAmount <= 0) {