using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Serialization; namespace Content.Shared.Storage { [NetworkedComponent()] public abstract class SharedStorageComponent : Component { [Serializable, NetSerializable] public sealed class StorageBoundUserInterfaceState : BoundUserInterfaceState { public readonly List StoredEntities; public readonly int StorageSizeUsed; public readonly int StorageCapacityMax; public StorageBoundUserInterfaceState(List storedEntities, int storageSizeUsed, int storageCapacityMax) { StoredEntities = storedEntities; StorageSizeUsed = storageSizeUsed; StorageCapacityMax = storageCapacityMax; } } [Serializable, NetSerializable] public sealed class StorageInsertItemMessage : BoundUserInterfaceMessage { } [Serializable, NetSerializable] public sealed class StorageInteractWithItemEvent : BoundUserInterfaceMessage { public readonly EntityUid InteractedItemUID; public StorageInteractWithItemEvent(EntityUid interactedItemUID) { InteractedItemUID = interactedItemUID; } } [Serializable, NetSerializable] public enum StorageUiKey { Key, } public abstract IReadOnlyList? StoredEntities { get; } /// /// Removes from the storage container and updates the stored value /// /// The entity to remove /// True if no longer in storage, false otherwise public abstract bool Remove(EntityUid entity); } /// /// Network event for displaying an animation of entities flying into a storage entity /// [Serializable, NetSerializable] public sealed class AnimateInsertingEntitiesEvent : EntityEventArgs { public readonly EntityUid Storage; public readonly List StoredEntities; public readonly List EntityPositions; public readonly List EntityAngles; public AnimateInsertingEntitiesEvent(EntityUid storage, List storedEntities, List entityPositions, List entityAngles) { Storage = storage; StoredEntities = storedEntities; EntityPositions = entityPositions; EntityAngles = entityAngles; } } [NetSerializable] [Serializable] public enum StorageVisuals : byte { Open, HasContents, CanLock, Locked } }