Files
tbd-station-14/Content.Server/GameObjects/Components/Items/Storage/StorableComponent.cs
DrSmugleaf cdedaeb12e Refactor drag and drop to use a shared interface (#2012)
* WIP in progress hours

* Cleanup

* Fix bugle

* Fix nullable error

* Merge fixes

* Merge fixes

* Merge fixes
2020-10-14 15:24:07 +02:00

48 lines
1.0 KiB
C#

using Content.Shared.GameObjects.Components.Storage;
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Items.Storage
{
[RegisterComponent]
[ComponentReference(typeof(SharedStorableComponent))]
public class StorableComponent : SharedStorableComponent
{
private int _size;
public override int Size
{
get => _size;
set
{
if (_size == value)
{
return;
}
_size = value;
Dirty();
}
}
public override ComponentState GetComponentState()
{
return new StorableComponentState(_size);
}
}
/// <summary>
/// Enum for the storage capacity of various containers
/// </summary>
public enum ReferenceSizes
{
Wallet = 4,
Pocket = 12,
Box = 24,
Belt = 30,
Toolbox = 60,
Backpack = 100,
NoStoring = 9999
}
}