Show / Hide Table of Contents

Class DrainComponent

A Drain allows an entity to absorb liquid in a disposal goal. Drains can be filled manually (with the Empty verb) or they can absorb puddles of liquid around them when AutoDrain is set to true. When the entity also has a SolutionContainerManager attached with a solution named drainBuffer, this solution gets filled until the drain is full. When the drain is full, it can be unclogged using a plunger (i.e. an entity with a Plunger tag attached). Later this can be refactored into a proper Plunger component if needed.

Inheritance
System.Object
DrainComponent
Namespace: Content.Shared.Fluids.Components
Assembly: Content.Shared.dll
Syntax
public sealed class DrainComponent : Component

Fields

| Improve this Doc View Source

Accumulator

Declaration
public float Accumulator
Field Value
Type Description
System.Single
| Improve this Doc View Source

AutoDrain

Does this drain automatically absorb surrouding puddles? Or is it a drain designed to empty solutions in it manually?

Declaration
public bool AutoDrain
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

DrainFrequency

How often in seconds the drain checks for puddles around it. If the EntityQuery seems a bit unperformant this can be increased.

Declaration
public float DrainFrequency
Field Value
Type Description
System.Single
| Improve this Doc View Source

ManualDrainSound

Declaration
public SoundSpecifier ManualDrainSound
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

PlungerSound

Declaration
public SoundSpecifier PlungerSound
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

PlungerTag

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

Range

How many (unobstructed) tiles away the drain will drain puddles from.

Declaration
public float Range
Field Value
Type Description
System.Single
| Improve this Doc View Source

SolutionName

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

UnclogDuration

How much time it takes to unclog it with a plunger

Declaration
public float UnclogDuration
Field Value
Type Description
System.Single
| Improve this Doc View Source

UnclogProbability

What's the probability of uncloging on each try

Declaration
public float UnclogProbability
Field Value
Type Description
System.Single
| Improve this Doc View Source

UnclogSound

Declaration
public SoundSpecifier UnclogSound
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

UnitsDestroyedPerSecond

How many units are ejected from the buffer per second.

Declaration
public float UnitsDestroyedPerSecond
Field Value
Type Description
System.Single
| Improve this Doc View Source

UnitsPerSecond

How many units per second the drain can absorb from the surrounding puddles. Divided by puddles, so if there are 5 puddles this will take 1/5 from each puddle. This will stay fixed to 1 second no matter what DrainFrequency is.

Declaration
public float UnitsPerSecond
Field Value
Type Description
System.Single
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾