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

@@ -57,7 +57,7 @@ namespace Content.Server.Chemistry.Components
}
var solutionsSys = EntitySystem.Get<SolutionContainerSystem>();
solutionsSys.TryGetSolution(Owner, SolutionName, out var hypoSpraySolution);
solutionsSys.TryGetSolution(Owner.Uid, SolutionName, out var hypoSpraySolution);
if (hypoSpraySolution == null || hypoSpraySolution.CurrentVolume == 0)
{
@@ -124,7 +124,7 @@ namespace Content.Server.Chemistry.Components
public override ComponentState GetComponentState(ICommonSession player)
{
var solutionSys = Owner.EntityManager.EntitySysManager.GetEntitySystem<SolutionContainerSystem>();
return solutionSys.TryGetSolution(Owner, SolutionName, out var solution)
return solutionSys.TryGetSolution(Owner.Uid, SolutionName, out var solution)
? new HyposprayComponentState(solution.CurrentVolume, solution.MaxVolume)
: new HyposprayComponentState(ReagentUnit.Zero, ReagentUnit.Zero);
}