2021-07-17 02:37:09 +02:00
|
|
|
|
using Robust.Shared.Prototypes;
|
2021-09-27 13:08:18 +02:00
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2021-02-25 06:18:29 +01:00
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
2023-06-25 11:44:37 -04:00
|
|
|
|
namespace Content.Shared.Stacks;
|
|
|
|
|
|
|
|
|
|
|
|
[Prototype("stack")]
|
2023-11-01 19:56:23 -07:00
|
|
|
|
public sealed partial class StackPrototype : IPrototype
|
2021-02-25 06:18:29 +01:00
|
|
|
|
{
|
2023-06-25 11:44:37 -04:00
|
|
|
|
[ViewVariables]
|
|
|
|
|
|
[IdDataField]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public string ID { get; private set; } = default!;
|
2023-06-25 11:44:37 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Human-readable name for this stack type e.g. "Steel"
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>This is a localization string ID.</remarks>
|
|
|
|
|
|
[DataField("name")]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public string Name { get; private set; } = string.Empty;
|
2023-06-25 11:44:37 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// An icon that will be used to represent this stack type.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("icon")]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public SpriteSpecifier? Icon { get; private set; }
|
2023-06-25 11:44:37 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The entity id that will be spawned by default from this stack.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("spawn", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public string Spawn { get; private set; } = string.Empty;
|
2023-06-25 11:44:37 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The maximum amount of things that can be in a stack.
|
|
|
|
|
|
/// Can be overriden on <see cref="StackComponent"/>
|
|
|
|
|
|
/// if null, simply has unlimited max count.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("maxCount")]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public int? MaxCount { get; private set; }
|
2023-06-25 11:44:37 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The size of an individual unit of this stack.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("itemSize")]
|
|
|
|
|
|
public int? ItemSize;
|
2021-02-25 06:18:29 +01:00
|
|
|
|
}
|
2023-06-25 11:44:37 -04:00
|
|
|
|
|