StackPrototype.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. using Robust.Shared.Utility;
  4. namespace Content.Shared.Stacks;
  5. [Prototype]
  6. public sealed partial class StackPrototype : IPrototype
  7. {
  8. [ViewVariables]
  9. [IdDataField]
  10. public string ID { get; private set; } = default!;
  11. /// <summary>
  12. /// Human-readable name for this stack type e.g. "Steel"
  13. /// </summary>
  14. /// <remarks>This is a localization string ID.</remarks>
  15. [DataField]
  16. public string Name { get; private set; } = string.Empty;
  17. /// <summary>
  18. /// An icon that will be used to represent this stack type.
  19. /// </summary>
  20. [DataField]
  21. public SpriteSpecifier? Icon { get; private set; }
  22. /// <summary>
  23. /// The entity id that will be spawned by default from this stack.
  24. /// </summary>
  25. [DataField(required: true)]
  26. public EntProtoId Spawn { get; private set; } = string.Empty;
  27. /// <summary>
  28. /// The maximum amount of things that can be in a stack.
  29. /// Can be overriden on <see cref="StackComponent"/>
  30. /// if null, simply has unlimited max count.
  31. /// </summary>
  32. [DataField]
  33. public int? MaxCount { get; private set; }
  34. }