Make MappingDataNode use string keys (#36111)
* MappingDataNode string keys * a * poke
This commit is contained in:
@@ -49,13 +49,11 @@ public sealed class ContainerFillSerializer : ITypeValidator<Dictionary<string,
|
||||
|
||||
foreach (var (key, val) in node.Children)
|
||||
{
|
||||
var keyVal = serializationManager.ValidateNode<string>(key, context);
|
||||
|
||||
var listVal = (val is SequenceDataNode seq)
|
||||
? ListSerializer.Validate(serializationManager, seq, dependencies, context)
|
||||
: new ErrorNode(val, "ContainerFillComponent prototypes must be a sequence/list");
|
||||
|
||||
mapping.Add(keyVal, listVal);
|
||||
mapping.Add(new ValidatedValueNode(node.GetKeyNode(key)), listVal);
|
||||
}
|
||||
|
||||
return new ValidatedMappingNode(mapping);
|
||||
|
||||
Reference in New Issue
Block a user