Files
OldThink/Content.Shared/GameObjects/Components/SharedStackComponent.cs

27 lines
803 B
C#
Raw Normal View History

2020-01-09 00:27:52 +01:00
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components
{
public abstract class SharedStackComponent : Component
{
public sealed override string Name => "Stack";
public sealed override uint? NetID => ContentNetIDs.STACK;
public sealed override Type StateType => typeof(StackComponentState);
[Serializable, NetSerializable]
protected sealed class StackComponentState : ComponentState
{
public int Count { get; }
public int MaxCount { get; }
public StackComponentState(int count, int maxCount) : base(ContentNetIDs.STACK)
{
Count = count;
MaxCount = maxCount;
}
}
}
}