Refactor Resolve and IEntity in SolutionContainerSystem (#5083)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Ygg01
2021-11-02 02:03:23 +01:00
committed by GitHub
parent a13e23528c
commit fc5fa67a56
30 changed files with 141 additions and 170 deletions

View File

@@ -547,7 +547,7 @@ namespace Content.Server.Botany.Components
public void UpdateReagents()
{
var solutionSystem = EntitySystem.Get<SolutionContainerSystem>();
if (!solutionSystem.TryGetSolution(Owner, SoilSolutionName, out var solution))
if (!solutionSystem.TryGetSolution(Owner.Uid, SoilSolutionName, out var solution))
return;
if (solution.TotalVolume <= 0 || MutationLevel >= 25)
@@ -725,7 +725,7 @@ namespace Content.Server.Botany.Components
var solutionSystem = EntitySystem.Get<SolutionContainerSystem>();
if (solutionSystem.TryGetDrainableSolution(usingItem.Uid, out var solution)
&& solutionSystem.TryGetSolution(Owner, SoilSolutionName, out var targetSolution))
&& solutionSystem.TryGetSolution(Owner.Uid, SoilSolutionName, out var targetSolution))
{
var amount = ReagentUnit.New(5);
var sprayed = false;
@@ -812,7 +812,7 @@ namespace Content.Server.Botany.Components
("usingItem", usingItem),
("owner", Owner)));
if (solutionSystem.TryGetSolution(usingItem, produce.SolutionName, out var solution2))
if (solutionSystem.TryGetSolution(usingItem.Uid, produce.SolutionName, out var solution2))
{
// This deliberately discards overfill.
solutionSystem.TryAddSolution(usingItem.Uid, solution2,