Files
tbd-station-14/Content.Shared/GameObjects/Components/Storage/SharedStorableComponent.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

33 lines
842 B
C#

using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Storage
{
public abstract class SharedStorableComponent : Component
{
public override string Name => "Storable";
public override uint? NetID => ContentNetIDs.STORABLE;
public virtual int Size { get; set; }
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);
serializer.DataField(this, s => s.Size, "size", 1);
}
}
[Serializable, NetSerializable]
public class StorableComponentState : ComponentState
{
public readonly int Size;
public StorableComponentState(int size) : base(ContentNetIDs.STORABLE)
{
Size = size;
}
}
}