Refactor Resolve and IEntity in SolutionContainerSystem (#5083)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -89,7 +89,7 @@ namespace Content.Server.Body.Behavior
|
||||
{
|
||||
get
|
||||
{
|
||||
EntitySystem.Get<SolutionContainerSystem>().TryGetSolution(Owner, DefaultSolutionName, out var solution);
|
||||
EntitySystem.Get<SolutionContainerSystem>().TryGetSolution(Owner.Uid, DefaultSolutionName, out var solution);
|
||||
return solution;
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,7 @@ namespace Content.Server.Body.Behavior
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
var solution = EntitySystem.Get<SolutionContainerSystem>().EnsureSolution(Owner, DefaultSolutionName);
|
||||
var solution = EntitySystem.Get<SolutionContainerSystem>().EnsureSolution(Owner.Uid, DefaultSolutionName);
|
||||
solution.MaxVolume = InitialMaxVolume;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Content.Server.Body.Circulatory
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_internalSolution = EntitySystem.Get<SolutionContainerSystem>().EnsureSolution(Owner, DefaultSolutionName);
|
||||
_internalSolution = EntitySystem.Get<SolutionContainerSystem>().EnsureSolution(Owner.Uid, DefaultSolutionName);
|
||||
if (_internalSolution != null)
|
||||
{
|
||||
_internalSolution.MaxVolume = _initialMaxVolume;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.Body.Metabolism
|
||||
|
||||
private void OnMetabolizerInit(EntityUid uid, MetabolizerComponent component, ComponentInit args)
|
||||
{
|
||||
_solutionContainerSystem.EnsureSolution(EntityManager.GetEntity(uid), component.SolutionName);
|
||||
_solutionContainerSystem.EnsureSolution(uid, component.SolutionName);
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
@@ -63,7 +63,7 @@ namespace Content.Server.Body.Metabolism
|
||||
if (body != null)
|
||||
{
|
||||
if (body.Owner.HasComponent<BloodstreamComponent>()
|
||||
&& solutionsSys.TryGetSolution(body.Owner, comp.SolutionName, out solution)
|
||||
&& solutionsSys.TryGetSolution(body.Owner.Uid, comp.SolutionName, out solution)
|
||||
&& solution.CurrentVolume >= ReagentUnit.Zero)
|
||||
{
|
||||
reagentList = solution.Contents;
|
||||
|
||||
Reference in New Issue
Block a user