BasicStationEventSchedulerComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Content.Shared.Destructible.Thresholds;
  2. using Content.Shared.EntityTable.EntitySelectors;
  3. namespace Content.Server.StationEvents.Components;
  4. [RegisterComponent, Access(typeof(BasicStationEventSchedulerSystem))]
  5. public sealed partial class BasicStationEventSchedulerComponent : Component
  6. {
  7. /// <summary>
  8. /// How long the the scheduler waits to begin starting rules.
  9. /// </summary>
  10. [DataField]
  11. public float MinimumTimeUntilFirstEvent = 200;
  12. /// <summary>
  13. /// The minimum and maximum time between rule starts in seconds.
  14. /// </summary>
  15. [DataField]
  16. public MinMax MinMaxEventTiming = new(3 * 60, 10 * 60);
  17. /// <summary>
  18. /// How long until the next check for an event runs, is initially set based on MinimumTimeUntilFirstEvent & MinMaxEventTiming.
  19. /// </summary>
  20. [DataField]
  21. public float TimeUntilNextEvent;
  22. /// <summary>
  23. /// The gamerules that the scheduler can choose from
  24. /// </summary>
  25. /// Reminder that though we could do all selection via the EntityTableSelector, we also need to consider various <see cref="StationEventComponent"/> restrictions.
  26. /// As such, we want to pass a list of acceptable game rules, which are then parsed for restrictions by the <see cref="EventManagerSystem"/>.
  27. [DataField(required: true)]
  28. public EntityTableSelector ScheduledGameRules = default!;
  29. }