| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using Robust.Shared.Prototypes;
- using Robust.Shared.Utility;
- namespace Content.Shared.Research.Prototypes;
- /// <summary>
- /// This is a prototype for a technology that can be unlocked.
- /// </summary>
- [Prototype]
- public sealed partial class TechnologyPrototype : IPrototype
- {
- /// <inheritdoc/>
- [IdDataField]
- public string ID { get; private set; } = default!;
- /// <summary>
- /// The name of the technology.
- /// Supports locale strings
- /// </summary>
- [DataField(required: true)]
- public LocId Name = string.Empty;
- /// <summary>
- /// An icon used to visually represent the technology in UI.
- /// </summary>
- [DataField(required: true)]
- public SpriteSpecifier Icon = default!;
- /// <summary>
- /// What research discipline this technology belongs to.
- /// </summary>
- [DataField(required: true)]
- public ProtoId<TechDisciplinePrototype> Discipline;
- /// <summary>
- /// What tier research is this?
- /// The tier governs how much lower-tier technology
- /// needs to be unlocked before this one.
- /// </summary>
- [DataField(required: true)]
- public int Tier;
- /// <summary>
- /// Hidden tech is not ever available at the research console.
- /// </summary>
- [DataField]
- public bool Hidden;
- /// <summary>
- /// How much research is needed to unlock.
- /// </summary>
- [DataField]
- public int Cost = 10000;
- /// <summary>
- /// A list of <see cref="TechnologyPrototype"/>s that need to be unlocked in order to unlock this technology.
- /// </summary>
- [DataField]
- public List<ProtoId<TechnologyPrototype>> TechnologyPrerequisites = new();
- /// <summary>
- /// A list of <see cref="LatheRecipePrototype"/>s that are unlocked by this technology
- /// </summary>
- [DataField]
- public List<ProtoId<LatheRecipePrototype>> RecipeUnlocks = new();
- /// <summary>
- /// A list of non-standard effects that are done when this technology is unlocked.
- /// </summary>
- [DataField]
- public IReadOnlyList<GenericUnlock> GenericUnlocks = new List<GenericUnlock>();
- }
- [DataDefinition]
- public partial record struct GenericUnlock()
- {
- /// <summary>
- /// What event is raised when this is unlocked?
- /// Used for doing non-standard logic.
- /// </summary>
- [DataField]
- public object? PurchaseEvent = null;
- /// <summary>
- /// A player facing tooltip for what the unlock does.
- /// Supports locale strings.
- /// </summary>
- [DataField]
- public string UnlockDescription = string.Empty;
- }
|