TechDisciplinePrototype.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Utility;
  3. namespace Content.Shared.Research.Prototypes;
  4. /// <summary>
  5. /// This is a prototype for a research discipline, a category
  6. /// that governs how <see cref="TechnologyPrototype"/>s are unlocked.
  7. /// </summary>
  8. [Prototype]
  9. public sealed partial class TechDisciplinePrototype : IPrototype
  10. {
  11. /// <inheritdoc/>
  12. [IdDataField]
  13. public string ID { get; private set; } = default!;
  14. /// <summary>
  15. /// Player-facing name.
  16. /// Supports locale strings.
  17. /// </summary>
  18. [DataField("name", required: true)]
  19. public string Name = string.Empty;
  20. /// <summary>
  21. /// A color used for UI
  22. /// </summary>
  23. [DataField("color", required: true)]
  24. public Color Color;
  25. /// <summary>
  26. /// An icon used to visually represent the discipline in UI.
  27. /// </summary>
  28. [DataField("icon")]
  29. public SpriteSpecifier Icon = default!;
  30. /// <summary>
  31. /// For each tier a discipline supports, what percentage
  32. /// of the previous tier must be unlocked for it to become available
  33. /// </summary>
  34. [DataField("tierPrerequisites", required: true)]
  35. public Dictionary<int, float> TierPrerequisites = new();
  36. /// <summary>
  37. /// Purchasing this tier of technology causes a server to become "locked" to this discipline.
  38. /// </summary>
  39. [DataField("lockoutTier")]
  40. public int LockoutTier = 3;
  41. }