1
0

SubGamemodesComponent.cs 713 B

1234567891011121314151617181920
  1. using Content.Server.GameTicking.Rules;
  2. using Content.Shared.Storage;
  3. namespace Content.Server.GameTicking.Rules.Components;
  4. /// <summary>
  5. /// When this gamerule is added it has a chance of adding other gamerules.
  6. /// Since it's done when added and not when started you can still use normal start logic.
  7. /// Used for starting subgamemodes in game presets.
  8. /// </summary>
  9. [RegisterComponent, Access(typeof(SubGamemodesSystem))]
  10. public sealed partial class SubGamemodesComponent : Component
  11. {
  12. /// <summary>
  13. /// Spawn entries for each gamerule prototype.
  14. /// Use orGroups if you want to limit rules.
  15. /// </summary>
  16. [DataField(required: true)]
  17. public List<EntitySpawnEntry> Rules = new();
  18. }