2024-03-03 00:36:36 -05:00
|
|
|
|
using Content.Shared.FixedPoint;
|
|
|
|
|
|
using Robust.Shared.GameStates;
|
2023-04-10 15:37:03 +10:00
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2021-10-27 09:24:18 +01:00
|
|
|
|
|
2024-03-03 00:36:36 -05:00
|
|
|
|
namespace Content.Shared.Fluids.Components;
|
2021-10-27 09:24:18 +01:00
|
|
|
|
|
2023-04-10 15:37:03 +10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Added to puddles that contain water so it may evaporate over time.
|
|
|
|
|
|
/// </summary>
|
2024-03-03 00:36:36 -05:00
|
|
|
|
[NetworkedComponent]
|
|
|
|
|
|
[RegisterComponent, Access(typeof(SharedPuddleSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class EvaporationComponent : Component
|
2023-04-10 15:37:03 +10:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The next time we remove the EvaporationSystem reagent amount from this entity.
|
|
|
|
|
|
/// </summary>
|
2024-03-03 00:36:36 -05:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("nextTick", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
2023-04-10 15:37:03 +10:00
|
|
|
|
public TimeSpan NextTick = TimeSpan.Zero;
|
2021-10-27 09:24:18 +01:00
|
|
|
|
|
2023-04-10 15:37:03 +10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// How much evaporation occurs every tick.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("evaporationAmount")]
|
|
|
|
|
|
public FixedPoint2 EvaporationAmount = FixedPoint2.New(0.3);
|
2024-09-28 18:09:30 +03:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// forcibly vaporizes ALL the chemicals
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField]
|
|
|
|
|
|
public bool CP14ForceEvaporation = false;
|
2021-10-27 09:24:18 +01:00
|
|
|
|
}
|