Files
tbd-station-14/Content.Shared/Storage/Components/SharedMapLayerData.cs
2022-04-06 15:21:45 +10:00

47 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using Content.Shared.Whitelist;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Shared.Storage.Components
{
[Serializable, NetSerializable]
public enum StorageMapVisuals : sbyte
{
InitLayers,
LayerChanged,
}
[Serializable]
[DataDefinition]
public sealed class SharedMapLayerData
{
public string Layer = string.Empty;
[DataField("whitelist", required: true, serverOnly: true)]
public EntityWhitelist ServerWhitelist { get; set; } = new();
}
[Serializable, NetSerializable]
public sealed class ShowLayerData : ICloneable
{
public IReadOnlyList<string> QueuedEntities { get; internal set; }
public ShowLayerData()
{
QueuedEntities = new List<string>();
}
public ShowLayerData(IEnumerable<string> other)
{
QueuedEntities = new List<string>(other);
}
public object Clone()
{
return new ShowLayerData(QueuedEntities);
}
}
}