From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Tue, 29 Jul 2025 14:39:48 +0000 (+0200) Subject: Make RemoveReagent return a FixedPoint2 (#39266) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=d4e77423caf57cc8e3bf34ef4912bc4a467e6c66;p=space-station-14.git Make RemoveReagent return a FixedPoint2 (#39266) change return --- diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs index 83de0970ec..5cc12a9b69 100644 --- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs @@ -510,20 +510,20 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem /// Removes reagent from a container. /// /// - /// Solution container from which we are removing reagent + /// Solution container from which we are removing reagent. /// The reagent to remove. - /// If the reagent to remove was found in the container. - public bool RemoveReagent(Entity soln, ReagentQuantity reagentQuantity) + /// The amount of reagent that was removed. + public FixedPoint2 RemoveReagent(Entity soln, ReagentQuantity reagentQuantity) { var (uid, comp) = soln; var solution = comp.Solution; var quant = solution.RemoveReagent(reagentQuantity); if (quant <= FixedPoint2.Zero) - return false; + return FixedPoint2.Zero; UpdateChemicals(soln); - return true; + return quant; } /// @@ -533,8 +533,8 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem /// Solution container from which we are removing reagent /// The Id of the reagent to remove. /// The amount of reagent to remove. - /// If the reagent to remove was found in the container. - public bool RemoveReagent(Entity soln, string prototype, FixedPoint2 quantity, List? data = null) + /// The amount of reagent that was removed. + public FixedPoint2 RemoveReagent(Entity soln, string prototype, FixedPoint2 quantity, List? data = null) { return RemoveReagent(soln, new ReagentQuantity(prototype, quantity, data)); } @@ -546,8 +546,8 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem /// Solution container from which we are removing reagent /// The reagent to remove. /// The amount of reagent to remove. - /// If the reagent to remove was found in the container. - public bool RemoveReagent(Entity soln, ReagentId reagentId, FixedPoint2 quantity) + /// The amount of reagent that was removed. + public FixedPoint2 RemoveReagent(Entity soln, ReagentId reagentId, FixedPoint2 quantity) { return RemoveReagent(soln, new ReagentQuantity(reagentId, quantity)); }