MeteorSwarmComponent.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using Content.Server.StationEvents.Events;
  2. using Content.Shared.Destructible.Thresholds;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Server.StationEvents.Components;
  6. [RegisterComponent, Access(typeof(MeteorSwarmSystem)), AutoGenerateComponentPause]
  7. public sealed partial class MeteorSwarmComponent : Component
  8. {
  9. [DataField, AutoPausedField]
  10. public TimeSpan NextWaveTime;
  11. /// <summary>
  12. /// We'll send a specific amount of waves of meteors towards the station per ending rather than using a timer.
  13. /// </summary>
  14. [DataField]
  15. public int WaveCounter;
  16. [DataField]
  17. public float MeteorVelocity = 10f;
  18. /// <summary>
  19. /// If true, meteors will be thrown from all angles instead of from a singular source
  20. /// </summary>
  21. [DataField]
  22. public bool NonDirectional;
  23. /// <summary>
  24. /// The announcement played when a meteor swarm begins.
  25. /// </summary>
  26. [DataField]
  27. public LocId? Announcement = "station-event-meteor-swarm-start-announcement";
  28. [DataField]
  29. public SoundSpecifier? AnnouncementSound = new SoundPathSpecifier("/Audio/Announcements/meteors.ogg")
  30. {
  31. Params = new()
  32. {
  33. Volume = -4
  34. }
  35. };
  36. /// <summary>
  37. /// Each meteor entity prototype and their corresponding weight in being picked.
  38. /// </summary>
  39. [DataField]
  40. public Dictionary<EntProtoId, float> Meteors = new();
  41. [DataField]
  42. public MinMax Waves = new(3, 3);
  43. [DataField]
  44. public MinMax MeteorsPerWave = new(3, 4);
  45. [DataField]
  46. public MinMax WaveCooldown = new (10, 60);
  47. }