Solution rejig (#12428)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Chemistry.Components.SolutionManager;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Shared.Body.Organ;
|
||||
@@ -47,7 +47,7 @@ namespace Content.Server.Body.Systems
|
||||
delta.Increment(stomach.UpdateInterval);
|
||||
if (delta.Lifetime > stomach.DigestionDelay)
|
||||
{
|
||||
if (stomachSolution.ContainsReagent(delta.ReagentId, out var quant))
|
||||
if (stomachSolution.TryGetReagent(delta.ReagentId, out var quant))
|
||||
{
|
||||
if (quant > delta.Quantity)
|
||||
quant = delta.Quantity;
|
||||
@@ -89,8 +89,7 @@ namespace Content.Server.Body.Systems
|
||||
|
||||
private void OnComponentInit(EntityUid uid, StomachComponent component, ComponentInit args)
|
||||
{
|
||||
var solution = _solutionContainerSystem.EnsureSolution(uid, DefaultSolutionName);
|
||||
solution.MaxVolume = component.InitialMaxVolume;
|
||||
_solutionContainerSystem.EnsureSolution(uid, DefaultSolutionName, component.InitialMaxVolume, out _);
|
||||
}
|
||||
|
||||
public bool CanTransferSolution(EntityUid uid, Solution solution,
|
||||
|
||||
Reference in New Issue
Block a user