Revert "Solution Entities" (#23160)

Revert "Solution Entities (#21916)"

This reverts commit d75e743dd7.
This commit is contained in:
Emisse
2023-12-28 20:45:42 -07:00
committed by GitHub
parent c2c76c2035
commit 938d6d9945
180 changed files with 2959 additions and 3543 deletions

View File

@@ -1,7 +1,7 @@
using Content.Server.Chemistry.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.FixedPoint;
using Robust.Shared.Timing;
@@ -31,7 +31,7 @@ public sealed class SolutionRegenerationSystem : EntitySystem
// timer ignores if its full, it's just a fixed cycle
regen.NextRegenTime = _timing.CurTime + regen.Duration;
if (_solutionContainer.ResolveSolution((uid, manager), regen.SolutionName, ref regen.Solution, out var solution))
if (_solutionContainer.TryGetSolution(uid, regen.Solution, out var solution, manager))
{
var amount = FixedPoint2.Min(solution.AvailableVolume, regen.Generated.Volume);
if (amount <= FixedPoint2.Zero)
@@ -48,13 +48,13 @@ public sealed class SolutionRegenerationSystem : EntitySystem
generated = regen.Generated.Clone().SplitSolution(amount);
}
_solutionContainer.TryAddSolution(regen.Solution.Value, generated);
_solutionContainer.TryAddSolution(uid, solution, generated);
}
}
}
private void OnUnpaused(Entity<SolutionRegenerationComponent> entity, ref EntityUnpausedEvent args)
private void OnUnpaused(EntityUid uid, SolutionRegenerationComponent comp, ref EntityUnpausedEvent args)
{
entity.Comp.NextRegenTime += args.PausedTime;
comp.NextRegenTime += args.PausedTime;
}
}