mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix metadata dupes on maps (#3505)
Fixes https://github.com/space-wizards/RobustToolbox/issues/3504
This commit is contained in:
@@ -915,6 +915,8 @@ public sealed class MapLoaderSystem : EntitySystem
|
||||
var entities = new SequenceDataNode();
|
||||
rootNode.Add("entities", entities);
|
||||
|
||||
// As metadata isn't on components we'll special-case it.
|
||||
var metadataName = _factory.GetComponentName(typeof(MetaDataComponent));
|
||||
var prototypeCompCache = new Dictionary<string, Dictionary<string, MappingDataNode>>();
|
||||
|
||||
foreach (var (saveId, entityUid) in uidEntityMap.OrderBy( e=> e.Key))
|
||||
@@ -941,6 +943,8 @@ public sealed class MapLoaderSystem : EntitySystem
|
||||
{
|
||||
cache.Add(compType, _serManager.WriteValueAs<MappingDataNode>(comp.Component.GetType(), comp.Component));
|
||||
}
|
||||
|
||||
cache.GetOrNew(metadataName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user