1
0

RandomWeatherRuleComponent.cs 974 B

1234567891011121314151617181920212223242526272829303132
  1. using Content.Shared.FixedPoint;
  2. using Content.Shared.Roles;
  3. using Content.Shared.Storage;
  4. using Robust.Shared.Network;
  5. using Robust.Shared.Prototypes;
  6. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  7. namespace Content.Server.GameTicking.Rules.Components;
  8. /// <summary>
  9. /// Gamerule that sets a random weather effect for this map.
  10. /// </summary>
  11. [RegisterComponent, Access(typeof(RandomWeatherRuleSystem))]
  12. public sealed partial class RandomWeatherRuleComponent : Component
  13. {
  14. [DataField("allowedWeathers")]
  15. public List<string> AllowedWeathers = ["Clear"];
  16. [DataField("currentWeather")]
  17. public string CurrentWeather = "Clear";
  18. /// <summary>
  19. /// List of pre-set colors, mostly for tdm maps so we can set fixed times of day.
  20. /// </summary>
  21. [DataField]
  22. public List<string> DayTimes = [
  23. "Day", //Daylight #D8B059
  24. "Dawn", //Dawn/Dusk #cf7330
  25. "Night", //Moonlight #2b3143
  26. ];
  27. }