Files
tbd-station-14/Content.Shared/_Offbrand/Wounds/SolutionExtensions.cs
Janet Blackquill 5fa17e22a1 De-MPL Offbrand
2025-09-27 22:43:24 -04:00

20 lines
500 B
C#

using Content.Shared.Chemistry.Components;
using Content.Shared.FixedPoint;
namespace Content.Shared._Offbrand.Wounds;
public static class SolutionExtensions
{
public static bool HasOverlapAtLeast(this Solution solution, Solution incoming, FixedPoint2 threshold)
{
var count = FixedPoint2.Zero;
foreach (var (reagent, quantity) in incoming.Contents)
{
count += solution.GetReagentQuantity(reagent);
}
return count >= threshold;
}
}