Cigarette ecs (#4495)
* Reorganized Shared.Storage folder * Replace StorageCounter with Item Counter * Change stack visuals setting data * Fix mirrorcult suggestions * Fix items from upstream * Fix type formatting
This commit is contained in:
27
Content.Shared/Storage/Components/ItemMapperComponent.cs
Normal file
27
Content.Shared/Storage/Components/ItemMapperComponent.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Storage.EntitySystems;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Shared.Storage.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[Friend(typeof(SharedItemMapperSystem))]
|
||||
public class ItemMapperComponent : Component, ISerializationHooks
|
||||
{
|
||||
public override string Name => "ItemMapper";
|
||||
|
||||
[DataField("mapLayers")] public readonly Dictionary<string, SharedMapLayerData> MapLayers = new();
|
||||
|
||||
void ISerializationHooks.AfterDeserialization()
|
||||
{
|
||||
foreach (var (layerName, val) in MapLayers)
|
||||
{
|
||||
val.Layer = layerName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user