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

@@ -0,0 +1,14 @@
using Content.Server.Fluids.EntitySystems;
using Content.Shared.Chemistry.Components;
namespace Content.Server.Fluids.Components;
[RegisterComponent]
[Friend(typeof(FluidSpreaderSystem))]
public sealed class FluidSpreaderComponent : Component
{
[ViewVariables]
public Solution OverflownSolution = default!;
public bool Enabled { get; set; }
}

View File

@@ -48,11 +48,6 @@ namespace Content.Server.Fluids.Components
[DataField("spillSound")]
public SoundSpecifier SpillSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");
/// <summary>
/// Whether or not this puddle is currently overflowing onto its neighbors
/// </summary>
public bool Overflown;
[ViewVariables(VVAccess.ReadOnly)]
public FixedPoint2 CurrentVolume => EntitySystem.Get<PuddleSystem>().CurrentVolume(Owner);