fix syringe overdrawing (#12298)

This commit is contained in:
Justin Trotter
2022-11-03 17:16:31 -07:00
committed by GitHub
parent 2856213c80
commit 31e58fe015

View File

@@ -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)
{