EvaporationComponent.cs 903 B

12345678910111213141516171819202122232425
  1. using Content.Shared.FixedPoint;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  4. namespace Content.Shared.Fluids.Components;
  5. /// <summary>
  6. /// Added to puddles that contain water so it may evaporate over time.
  7. /// </summary>
  8. [NetworkedComponent]
  9. [RegisterComponent, Access(typeof(SharedPuddleSystem))]
  10. public sealed partial class EvaporationComponent : Component
  11. {
  12. /// <summary>
  13. /// The next time we remove the EvaporationSystem reagent amount from this entity.
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite), DataField("nextTick", customTypeSerializer: typeof(TimeOffsetSerializer))]
  16. public TimeSpan NextTick = TimeSpan.Zero;
  17. /// <summary>
  18. /// How much evaporation occurs every tick.
  19. /// </summary>
  20. [DataField("evaporationAmount")]
  21. public FixedPoint2 EvaporationAmount = FixedPoint2.New(0.3);
  22. }