serv4 + submodule update (#12740)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,6 @@ using Content.Server.Storage.Components;
|
||||
using Content.Shared.Storage;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager;
|
||||
using Robust.Shared.Serialization.Markdown;
|
||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||
using Robust.Shared.Serialization.Markdown.Sequence;
|
||||
using Robust.Shared.Serialization.Markdown.Validation;
|
||||
@@ -36,7 +35,7 @@ public sealed class ContainerFillComponent : Component
|
||||
// all of this exists just to validate prototype ids.
|
||||
// it would be nice if you could specify only a type validator and not have to re-implement everything else.
|
||||
// or a dictionary serializer that accepts a custom type serializer for the dictionary values
|
||||
public sealed class ContainerFillSerializer : ITypeSerializer<Dictionary<string, List<string>>, MappingDataNode>
|
||||
public sealed class ContainerFillSerializer : ITypeValidator<Dictionary<string, List<string>>, MappingDataNode>
|
||||
{
|
||||
private static PrototypeIdListSerializer<EntityPrototype> ListSerializer => new();
|
||||
|
||||
@@ -61,35 +60,4 @@ public sealed class ContainerFillSerializer : ITypeSerializer<Dictionary<string,
|
||||
|
||||
return new ValidatedMappingNode(mapping);
|
||||
}
|
||||
|
||||
public Dictionary<string, List<string>> Copy(
|
||||
ISerializationManager serializationManager,
|
||||
Dictionary<string, List<string>> source,
|
||||
Dictionary<string, List<string>> target,
|
||||
bool skipHook,
|
||||
ISerializationContext? context = null)
|
||||
{
|
||||
serializationManager.Copy(source, ref target, context, skipHook);
|
||||
return target;
|
||||
}
|
||||
|
||||
public Dictionary<string, List<string>> Read(
|
||||
ISerializationManager serializationManager,
|
||||
MappingDataNode node,
|
||||
IDependencyCollection dependencies,
|
||||
bool skipHook,
|
||||
ISerializationContext? context = null,
|
||||
Dictionary<string, List<string>>? value = null)
|
||||
{
|
||||
return serializationManager.Read(node, context, skipHook, value);
|
||||
}
|
||||
|
||||
public DataNode Write(ISerializationManager serializationManager,
|
||||
Dictionary<string, List<string>> value,
|
||||
IDependencyCollection dependencies,
|
||||
bool alwaysWrite = false,
|
||||
ISerializationContext? context = null)
|
||||
{
|
||||
return serializationManager.WriteValue(value, alwaysWrite, context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user