ItemMapper ECS (#9867)

This commit is contained in:
metalgearsloth
2022-08-08 12:35:57 +10:00
committed by GitHub
parent b55b806c6b
commit 189d49a51f
13 changed files with 112 additions and 156 deletions

View File

@@ -1,5 +1,5 @@
using Content.Shared.Storage.EntitySystems;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Shared.Storage.Components
{
@@ -54,17 +54,12 @@ namespace Content.Shared.Storage.Components
/// </summary>
[RegisterComponent]
[Access(typeof(SharedItemMapperSystem))]
public sealed class ItemMapperComponent : Component, ISerializationHooks
public sealed class ItemMapperComponent : Component
{
[DataField("mapLayers")] public readonly Dictionary<string, SharedMapLayerData> MapLayers = new();
void ISerializationHooks.AfterDeserialization()
{
foreach (var (layerName, val) in MapLayers)
{
val.Layer = layerName;
}
}
[DataField("sprite")] public ResourcePath? RSIPath;
public readonly List<string> SpriteLayers = new();
}
}