mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
misc client optimizations
This commit is contained in:
@@ -256,8 +256,12 @@ namespace Robust.Shared.Prototypes
|
||||
MappingDataNode? fullData = null;
|
||||
if (prototypeData != null && prototypeData.TryGet<SequenceDataNode>("components", out var compList))
|
||||
{
|
||||
fullData = compList.Cast<MappingDataNode>().FirstOrDefault(x =>
|
||||
x.TryGet<ValueDataNode>("type", out var typeNode) && typeNode.Value == name);
|
||||
foreach (var data in compList)
|
||||
{
|
||||
if(data is not MappingDataNode mappingDataNode || !mappingDataNode.TryGet<ValueDataNode>("type", out var typeNode) || typeNode.Value != name ) continue;
|
||||
fullData = mappingDataNode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fullData ??= new MappingDataNode();
|
||||
|
||||
Reference in New Issue
Block a user