Revert 'Revert 'Solution Entities'' (#23168)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Server.Chemistry.Containers.EntitySystems;
|
||||
using Content.Shared.Chemistry.Components.SolutionManager;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems;
|
||||
@@ -30,13 +29,13 @@ public sealed class SolutionPurgeSystem : EntitySystem
|
||||
|
||||
// timer ignores if it's empty, it's just a fixed cycle
|
||||
purge.NextPurgeTime += purge.Duration;
|
||||
if (_solutionContainer.TryGetSolution(uid, purge.Solution, out var solution, manager))
|
||||
_solutionContainer.SplitSolutionWithout(uid, solution, purge.Quantity, purge.Preserve.ToArray());
|
||||
if (_solutionContainer.TryGetSolution((uid, manager), purge.Solution, out var solution))
|
||||
_solutionContainer.SplitSolutionWithout(solution.Value, purge.Quantity, purge.Preserve.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUnpaused(EntityUid uid, SolutionPurgeComponent comp, ref EntityUnpausedEvent args)
|
||||
private void OnUnpaused(Entity<SolutionPurgeComponent> entity, ref EntityUnpausedEvent args)
|
||||
{
|
||||
comp.NextPurgeTime += args.PausedTime;
|
||||
entity.Comp.NextPurgeTime += args.PausedTime;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user