NumberObjectiveComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Content.Server.Objectives.Systems;
  2. namespace Content.Server.Objectives.Components;
  3. /// <summary>
  4. /// Objective has a target number of something.
  5. /// When the objective is assigned it randomly picks this target from a minimum to a maximum.
  6. /// </summary>
  7. [RegisterComponent, Access(typeof(NumberObjectiveSystem))]
  8. public sealed partial class NumberObjectiveComponent : Component
  9. {
  10. /// <summary>
  11. /// Number to use in the objective condition.
  12. /// </summary>
  13. [DataField, ViewVariables(VVAccess.ReadWrite)]
  14. public int Target;
  15. /// <summary>
  16. /// Minimum number for target to roll.
  17. /// </summary>
  18. [DataField(required: true)]
  19. public int Min;
  20. /// <summary>
  21. /// Maximum number for target to roll.
  22. /// </summary>
  23. [DataField(required: true)]
  24. public int Max;
  25. /// <summary>
  26. /// Optional title locale id, passed "count" with <see cref="Target"/>.
  27. /// </summary>
  28. [DataField, ViewVariables(VVAccess.ReadWrite)]
  29. public string? Title;
  30. /// <summary>
  31. /// Optional description locale id, passed "count" with <see cref="Target"/>.
  32. /// </summary>
  33. [DataField, ViewVariables(VVAccess.ReadWrite)]
  34. public string? Description;
  35. }