GhostRoleRaffleConfig.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Content.Shared.Ghost.Roles.Raffles;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Server.Ghost.Roles.Raffles;
  4. /// <summary>
  5. /// Raffle configuration.
  6. /// </summary>
  7. [DataDefinition]
  8. public sealed partial class GhostRoleRaffleConfig
  9. {
  10. public GhostRoleRaffleConfig(GhostRoleRaffleSettings settings)
  11. {
  12. SettingsOverride = settings;
  13. }
  14. /// <summary>
  15. /// Specifies the raffle settings to use.
  16. /// </summary>
  17. [DataField("settings", required: true)]
  18. public ProtoId<GhostRoleRaffleSettingsPrototype> Settings { get; set; } = "default";
  19. /// <summary>
  20. /// If not null, the settings from <see cref="Settings"/> are ignored and these settings are used instead.
  21. /// Intended for allowing admins to set custom raffle settings for admeme ghost roles.
  22. /// </summary>
  23. [ViewVariables(VVAccess.ReadOnly)]
  24. public GhostRoleRaffleSettings? SettingsOverride { get; set; }
  25. /// <summary>
  26. /// Sets which <see cref="IGhostRoleRaffleDecider"/> is used.
  27. /// </summary>
  28. [DataField("decider")]
  29. public ProtoId<GhostRoleRaffleDeciderPrototype> Decider { get; set; } = "default";
  30. }