Make MappingDataNode use string keys (#36111)

* MappingDataNode string keys

* a

* poke
This commit is contained in:
Leon Friedrich
2025-04-18 19:28:22 +10:00
committed by GitHub
parent 644cce2b9f
commit e4f3d19094
6 changed files with 19 additions and 34 deletions

View File

@@ -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);