2022-05-13 00:59:03 -07:00
|
|
|
|
using Content.Shared.Storage.EntitySystems;
|
2021-07-22 11:56:55 +02:00
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
2021-09-04 19:42:32 +02:00
|
|
|
|
namespace Content.Shared.Storage.Components
|
2021-07-22 11:56:55 +02:00
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
|
[Access(typeof(SharedItemMapperSystem))]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ItemMapperComponent : Component, ISerializationHooks
|
2021-07-22 11:56:55 +02:00
|
|
|
|
{
|
|
|
|
|
|
[DataField("mapLayers")] public readonly Dictionary<string, SharedMapLayerData> MapLayers = new();
|
|
|
|
|
|
|
|
|
|
|
|
void ISerializationHooks.AfterDeserialization()
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var (layerName, val) in MapLayers)
|
|
|
|
|
|
{
|
|
|
|
|
|
val.Layer = layerName;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2021-09-04 19:42:32 +02:00
|
|
|
|
}
|