Replace old Overflow algorithm (#6280)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Ygg01
2022-02-15 03:22:26 +01:00
committed by GitHub
parent 8977b104a7
commit 6f36f5b60d
8 changed files with 313 additions and 230 deletions

View File

@@ -1,5 +1,4 @@
using Content.Server.Fluids.Components;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Fluids.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
@@ -20,8 +19,8 @@ namespace Content.Server.Chemistry.TileReactions
var spillSystem = EntitySystem.Get<SpillableSystem>();
if (reactVolume < 5 || !spillSystem.TryGetPuddle(tile, out _)) return FixedPoint2.Zero;
return spillSystem.SpillAt(tile,new Solution(reagent.ID, reactVolume), "PuddleSmear", true, false, true) != null
? reactVolume
return spillSystem.SpillAt(tile,new Solution(reagent.ID, reactVolume), "PuddleSmear", true, false, true) != null
? reactVolume
: FixedPoint2.Zero;
}
}