Item status!
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user