Fix and refactor SolutionContainerSystem.RemoveEachReagent (#7245)

This commit is contained in:
Vera Aguilera Puerto
2022-03-23 14:05:10 +01:00
committed by GitHub
parent be6431f7aa
commit 46ac70a734
3 changed files with 39 additions and 34 deletions

View File

@@ -569,10 +569,10 @@ namespace Content.Server.Botany.Components
else
{
var amt = FixedPoint2.New(1);
foreach (var reagent in solutionSystem.RemoveEachReagent(Owner, solution, amt))
foreach (var (reagentId, quantity) in solutionSystem.RemoveEachReagent(Owner, solution, amt))
{
var reagentProto = _prototypeManager.Index<ReagentPrototype>(reagent);
reagentProto.ReactionPlant(Owner, new Solution.ReagentQuantity(reagent, amt), solution);
var reagentProto = _prototypeManager.Index<ReagentPrototype>(reagentId);
reagentProto.ReactionPlant(Owner, new Solution.ReagentQuantity(reagentId, quantity), solution);
}
}