Show / Hide Table of Contents

Class PuddleSystem

Handles solutions on floors. Also handles the spreader logic for where the solution overflows a specified volume.

Inheritance
System.Object
SharedPuddleSystem
PuddleSystem
Namespace: Content.Server.Fluids.EntitySystems
Assembly: Content.Server.dll
Syntax
public sealed class PuddleSystem : SharedPuddleSystem

Fields

| Improve this Doc View Source

EvaporationReagent

Declaration
public const string EvaporationReagent = null
Field Value
Type Description
System.String
| Improve this Doc View Source

PuddleVolume

Declaration
public static float PuddleVolume
Field Value
Type Description
System.Single

Methods

| Improve this Doc View Source

CanFullyEvaporate(Solution)

Declaration
public bool CanFullyEvaporate(Solution solution)
Parameters
Type Name Description
Solution solution
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CurrentVolume(EntityUid, PuddleComponent)

Gets the current volume of the given puddle, which may not necessarily be PuddleVolume.

Declaration
public FixedPoint2 CurrentVolume(EntityUid uid, PuddleComponent puddleComponent = null)
Parameters
Type Name Description
EntityUid uid
PuddleComponent puddleComponent
Returns
Type Description
FixedPoint2
| Improve this Doc View Source

GetOverflowSolution(EntityUid, PuddleComponent)

Gets the solution amount above the overflow threshold for the puddle.

Declaration
public Solution GetOverflowSolution(EntityUid uid, PuddleComponent puddle = null)
Parameters
Type Name Description
EntityUid uid
PuddleComponent puddle
Returns
Type Description
Solution
| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
Overrides
SharedPuddleSystem.Initialize()
| Improve this Doc View Source

TryAddSolution(EntityUid, Solution, Boolean, Boolean, PuddleComponent)

Try to add solution to puddleUid.

Declaration
public bool TryAddSolution(EntityUid puddleUid, Solution addedSolution, bool sound = true, bool checkForOverflow = true, PuddleComponent puddleComponent = null)
Parameters
Type Name Description
EntityUid puddleUid

Puddle to which we add

Solution addedSolution

Solution that is added to puddleComponent

System.Boolean sound

Play sound on overflow

System.Boolean checkForOverflow

Overflow on encountered values

PuddleComponent puddleComponent

Optional resolved PuddleComponent

Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetPuddle(TileRef, out EntityUid)

Tries to get the relevant puddle entity for a tile.

Declaration
public bool TryGetPuddle(TileRef tile, out EntityUid puddleUid)
Parameters
Type Name Description
Robust.Shared.Map.TileRef tile
EntityUid puddleUid
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TrySpillAt(EntityUid, Solution, out EntityUid, Boolean, Nullable<TransformComponent>)

Declaration
public bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true, TransformComponent? transformComponent = null)
Parameters
Type Name Description
EntityUid uid
Solution solution
EntityUid puddleUid
System.Boolean sound
System.Nullable<TransformComponent> transformComponent
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TrySpillAt(EntityCoordinates, Solution, out EntityUid, Boolean)

Spills solution at the specified coordinates. Will add to an existing puddle if present or create a new one if not.

Declaration
public bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true)
Parameters
Type Name Description
Robust.Shared.Map.EntityCoordinates coordinates
Solution solution
EntityUid puddleUid
System.Boolean sound
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TrySpillAt(TileRef, Solution, out EntityUid, Boolean, Boolean)

Declaration
public bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true, bool tileReact = true)
Parameters
Type Name Description
Robust.Shared.Map.TileRef tileRef
Solution solution
EntityUid puddleUid
System.Boolean sound
System.Boolean tileReact
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TrySplashSpillAt(EntityUid, EntityCoordinates, Solution, out EntityUid, Boolean, Nullable<EntityUid>)

First splashes reagent on reactive entities near the spilling entity, then spills the rest regularly to a puddle. This is intended for 'destructive' spills, like when entities are destroyed or thrown.

Declaration
public bool TrySplashSpillAt(EntityUid uid, EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true, EntityUid? user = null)
Parameters
Type Name Description
EntityUid uid
Robust.Shared.Map.EntityCoordinates coordinates
Solution solution
EntityUid puddleUid
System.Boolean sound
System.Nullable<EntityUid> user
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Update(Single)

Declaration
public override void Update(float frameTime)
Parameters
Type Name Description
System.Single frameTime
| Improve this Doc View Source

WouldOverflow(EntityUid, Solution, PuddleComponent)

Whether adding this solution to this puddle would overflow.

Declaration
public bool WouldOverflow(EntityUid uid, Solution solution, PuddleComponent puddle = null)
Parameters
Type Name Description
EntityUid uid
Solution solution
PuddleComponent puddle
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾