WeatherNomadsComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations;
  3. namespace Content.Shared.Weather;
  4. [RegisterComponent, NetworkedComponent]
  5. public sealed partial class WeatherNomadsComponent : Component
  6. {
  7. [DataField("enabledWeathers")]
  8. public HashSet<string> EnabledWeathers { get; set; } = new();
  9. [DataField("minSeasonMinutes")]
  10. public int MinSeasonMinutes { get; set; } = 30;
  11. [DataField("maxSeasonMinutes")]
  12. public int MaxSeasonMinutes { get; set; } = 45;
  13. [DataField("minPrecipitationDurationMinutes")]
  14. public int MinPrecipitationDurationMinutes { get; set; } = 5;
  15. [DataField("maxPrecipitationDurationMinutes")]
  16. public int MaxPrecipitationDurationMinutes { get; set; } = 10;
  17. [DataField("currentPrecipitation")]
  18. public Precipitation CurrentPrecipitation { get; set; } = Precipitation.LightWet;
  19. [DataField("currentWeather")]
  20. public string CurrentWeather { get; set; } = "Clear";
  21. [DataField("nextSwitchTime", customTypeSerializer: typeof(TimespanSerializer))]
  22. public TimeSpan NextSwitchTime { get; set; } = TimeSpan.Zero;
  23. [DataField("nextSeasonChange", customTypeSerializer: typeof(TimespanSerializer))]
  24. public TimeSpan NextSeasonChange { get; set; } = TimeSpan.Zero;
  25. [DataField("currentSeason")]
  26. public string CurrentSeason { get; set; } = "Spring";
  27. }