2021-10-27 09:24:18 +01:00
using Content.Server.Fluids.EntitySystems ;
2021-11-03 16:48:03 -07:00
using Content.Shared.FixedPoint ;
2021-10-27 09:24:18 +01:00
namespace Content.Server.Fluids.Components
{
[RegisterComponent]
2022-06-07 15:26:28 +02:00
[Access(typeof(EvaporationSystem))]
2021-10-27 09:24:18 +01:00
public sealed class EvaporationComponent : Component
{
2022-02-10 15:07:21 -06:00
/// <summary>
/// Is this entity actively evaporating? This toggle lets us pause evaporation under certain conditions.
/// </summary>
[DataField("evaporationToggle")]
public bool EvaporationToggle = true ;
2021-10-27 09:24:18 +01:00
/// <summary>
2021-11-03 16:48:03 -07:00
/// The time that it will take this puddle to lose one fixed unit of solution, in seconds.
2021-10-27 09:24:18 +01:00
/// </summary>
[DataField("evaporateTime")]
public float EvaporateTime { get ; set ; } = 5f ;
/// <summary>
/// Name of referenced solution. Defaults to <see cref="PuddleComponent.DefaultSolutionName"/>
/// </summary>
[DataField("solution")]
public string SolutionName { get ; set ; } = PuddleComponent . DefaultSolutionName ;
/// <summary>
/// Lower limit below which puddle won't evaporate. Useful when wanting to leave a stain.
/// Defaults to evaporate completely.
/// </summary>
[DataField("lowerLimit")]
2021-11-03 16:48:03 -07:00
public FixedPoint2 LowerLimit = FixedPoint2 . Zero ;
2021-10-27 09:24:18 +01:00
/// <summary>
2022-02-17 19:42:47 -07:00
/// Upper limit above which puddle won't evaporate. Useful when wanting to make sure large puddle will
2022-02-10 15:07:21 -06:00
/// remain forever. Defaults to 100.
2021-10-27 09:24:18 +01:00
/// </summary>
[DataField("upperLimit")]
2022-02-10 15:07:21 -06:00
public FixedPoint2 UpperLimit = FixedPoint2 . New ( 100 ) ; //TODO: Consider setting this back to PuddleComponent.DefaultOverflowVolume once that behaviour is fixed.
2021-10-27 09:24:18 +01:00
/// <summary>
/// The time accumulated since the start.
/// </summary>
2022-04-23 22:27:19 -04:00
[DataField("accumulator")]
2021-10-27 09:24:18 +01:00
public float Accumulator = 0f ;
}
}