fix solution contents duplication on spill behavior (#33231)

* I’M SCREAMING INTO THE VOID AND IT’S NOT LISTENING

* review

* explodes pancakes with mind

* graaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* Meteors RAAAAAAAAAAH

* I'm so tired of solutions

* whhop

* revert

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
Milon
2026-01-26 19:25:32 +01:00
committed by BarryNorfolk
co-authored by Princess Cheeseballs
parent 3a96154bca
commit 857ddff7cb
6 changed files with 69 additions and 56 deletions
@@ -32,16 +32,10 @@ public sealed partial class PuddleSystem
private void SpillOnLand(Entity<SpillableComponent> entity, ref LandEvent args)
{
if (!_solutionContainerSystem.TryGetSolution(entity.Owner, entity.Comp.SolutionName, out var soln, out var solution))
if (!entity.Comp.SpillWhenThrown || Openable.IsClosed(entity.Owner))
return;
if (Openable.IsClosed(entity.Owner))
return;
if (!entity.Comp.SpillWhenThrown)
return;
if (args.User != null)
if (TrySplashSpillAt(entity.Owner, Transform(entity).Coordinates, out _, out var solution) && args.User != null)
{
// DeltaV - Beer Goggles Safe Throw
if (_safeSolutionThrower.GetSafeThrow(args.User.Value))
@@ -55,9 +49,6 @@ public sealed partial class PuddleSystem
AdminLogger.Add(LogType.Landed,
$"{ToPrettyString(entity.Owner):entity} spilled a solution {SharedSolutionContainerSystem.ToPrettyString(solution):solution} on landing");
}
var drainedSolution = _solutionContainerSystem.Drain(entity.Owner, soln.Value, solution.Volume);
TrySplashSpillAt(entity.Owner, Transform(entity).Coordinates, drainedSolution, out _);
}
private void OnDoAfter(Entity<SpillableComponent> entity, ref SpillDoAfterEvent args)