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;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Stacks
|
|
|
|
|
|
{
|
|
|
|
|
|
[Prototype("stack")]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class StackPrototype : IPrototype
|
2021-02-25 06:18:29 +01:00
|
|
|
|
{
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[ViewVariables]
|
2023-01-19 03:56:45 +01:00
|
|
|
|
[IdDataField]
|
2021-03-05 01:08:38 +01:00
|
|
|
|
public string ID { get; } = default!;
|
2021-02-25 06:18:29 +01:00
|
|
|
|
|
2021-09-27 13:08:18 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Human-readable name for this stack type e.g. "Steel"
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>This is a localization string ID.</remarks>
|
2021-05-04 15:37:16 +02:00
|
|
|
|
[DataField("name")]
|
2021-03-05 01:08:38 +01:00
|
|
|
|
public string Name { get; } = string.Empty;
|
|
|
|
|
|
|
2021-09-27 13:08:18 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// An icon that will be used to represent this stack type.
|
|
|
|
|
|
/// </summary>
|
2021-05-04 15:37:16 +02:00
|
|
|
|
[DataField("icon")]
|
2022-11-08 21:24:23 -05:00
|
|
|
|
public SpriteSpecifier? Icon { get; }
|
2021-02-25 06:18:29 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The entity id that will be spawned by default from this stack.
|
|
|
|
|
|
/// </summary>
|
2021-09-27 13:08:18 +02:00
|
|
|
|
[DataField("spawn", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2021-05-26 10:20:57 +02:00
|
|
|
|
public string Spawn { get; } = string.Empty;
|
2022-11-08 21:24:23 -05:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The maximum amount of things that can be in a stack.
|
2022-12-24 23:28:21 -05:00
|
|
|
|
/// Can be overriden on <see cref="StackComponent"/>
|
2022-11-08 21:24:23 -05:00
|
|
|
|
/// if null, simply has unlimited max count.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("maxCount")]
|
|
|
|
|
|
public int? MaxCount { get; }
|
2021-02-25 06:18:29 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|