* eye on the prize * OnStackInteractUsing, TryMergeStacks, TryMergeToHands, TryMergeToContacts * namespace * Use, get count, getMaxCount * component access * add regions, mark TODO * obsolete TryAdd, public TryMergeStacks * GetMaxCount * event handlers * event handlers * SetCount * client server event handlers * move to shared * Revert "move to shared" This reverts commit 45540a2d6b8e1e6d2a8f83a584267776c7edcd73. * misc changes to shared * split * spawn and SpawnNextToOrDrop * SpawnMultipleAtPosition, SpawnMultipleNextToOrDrop, CalculateSpawns, general server cleanup * Rename Use to TryUse. * Small misc changes * Remove obsolete functions * Remove some SetCount calls * Partialize * small misc change * don't nuke the git dif with the namespace block * Comments and reordering * touchup to UpdateLingering * Summary comment for StackStatusControl * Last pass * Actual last pass (for now) * I know myself too well * fixup * goodbye lingering * fixes * review * fix test * second look * fix test * forgot * remove early comp getting --------- Co-authored-by: iaada <iaada@users.noreply.github.com> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Shared.Stacks;
|
|
|
|
/// <summary>
|
|
/// Prototype used to combine and spawn like-entities for <see cref="SharedStackSystem"/>.
|
|
/// </summary>
|
|
[Prototype]
|
|
public sealed partial class StackPrototype : IPrototype, IInheritingPrototype
|
|
{
|
|
/// <inheritdoc />
|
|
[IdDataField]
|
|
public string ID { get; private set; } = default!;
|
|
|
|
/// <inheritdoc />
|
|
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<StackPrototype>))]
|
|
public string[]? Parents { get; private set; }
|
|
|
|
/// <inheritdoc />
|
|
[NeverPushInheritance]
|
|
[AbstractDataField]
|
|
public bool Abstract { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Human-readable name for this stack type e.g. "Steel"
|
|
/// </summary>
|
|
/// <remarks>This is a localization string ID.</remarks>
|
|
[DataField]
|
|
public LocId Name { get; private set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// An icon that will be used to represent this stack type.
|
|
/// </summary>
|
|
[DataField]
|
|
public SpriteSpecifier? Icon { get; private set; }
|
|
|
|
/// <summary>
|
|
/// The entity id that will be spawned by default from this stack.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntProtoId<StackComponent> Spawn { get; private set; } = string.Empty;
|
|
|
|
/// <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]
|
|
public int? MaxCount { get; private set; }
|
|
}
|