]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix the Infinite Spill (#42022)
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Tue, 23 Dec 2025 19:47:46 +0000 (11:47 -0800)
committerGitHub <noreply@github.com>
Tue, 23 Dec 2025 19:47:46 +0000 (19:47 +0000)
i hate solutions i hate solutions

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Server/Fluids/EntitySystems/PuddleSystem.cs

index c756a8e6963679ff148ff193c52ffd1dd0c12b24..aca8c5383d6a1cdfd9f184af428650f6c8b5f35a 100644 (file)
@@ -387,21 +387,34 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
 
         spilled = solution.Value.Comp.Solution;
 
-        return TrySplashSpillAt(entity, coordinates, spilled, out puddleUid, sound, user);
+        return TrySplashSpillAt(entity, coordinates, solution.Value, out puddleUid, sound, user);
+    }
+
+    private bool TrySplashSpillAt(EntityUid entity,
+        EntityCoordinates coordinates,
+        Entity<SolutionComponent> solution,
+        out EntityUid puddleUid,
+        bool sound = true,
+        EntityUid? user = null)
+    {
+        var result = TrySplashSpillAt(entity, coordinates, solution.Comp.Solution, out puddleUid, sound, user);
+        _solutionContainerSystem.UpdateChemicals(solution);
+        return result;
     }
 
     public override bool TrySplashSpillAt(EntityUid entity,
         EntityCoordinates coordinates,
-        Solution spilled,
+        Solution solution,
         out EntityUid puddleUid,
         bool sound = true,
         EntityUid? user = null)
     {
         puddleUid = EntityUid.Invalid;
 
-        if (spilled.Volume == 0)
+        if (solution.Volume == 0)
             return false;
 
+        var spilled = solution.SplitSolution(solution.Volume);
         var targets = new List<EntityUid>();
         var reactive = new HashSet<Entity<ReactiveComponent>>();
         _lookup.GetEntitiesInRange(coordinates, 1.0f, reactive);