LatheRecipePackPrototype.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. using Content.Shared.Research.Prototypes;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
  4. namespace Content.Shared.Lathe.Prototypes;
  5. /// <summary>
  6. /// A pack of lathe recipes that one or more lathes can use.
  7. /// Packs will inherit the parents recipes when using inheritance, so you don't need to copy paste them.
  8. /// </summary>
  9. [Prototype]
  10. public sealed partial class LatheRecipePackPrototype : IPrototype, IInheritingPrototype
  11. {
  12. [ViewVariables]
  13. [IdDataField]
  14. public string ID { get; private set; } = default!;
  15. [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<LatheRecipePackPrototype>))]
  16. public string[]? Parents { get; private set; }
  17. [NeverPushInheritance]
  18. [AbstractDataField]
  19. public bool Abstract { get; private set; }
  20. /// <summary>
  21. /// The lathe recipes contained by this pack.
  22. /// </summary>
  23. [DataField(required: true)]
  24. [AlwaysPushInheritance]
  25. public HashSet<ProtoId<LatheRecipePrototype>> Recipes = new();
  26. }