Changes for prototype load parallelization (#13066)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
584921b423
commit
a323671984
@@ -1,4 +1,5 @@
|
||||
using Robust.Shared.Reflection;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager;
|
||||
using Robust.Shared.Serialization.Markdown;
|
||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||
@@ -47,7 +48,7 @@ public sealed class NPCBlackboardSerializer : ITypeReader<NPCBlackboard, Mapping
|
||||
|
||||
public NPCBlackboard Read(ISerializationManager serializationManager, MappingDataNode node,
|
||||
IDependencyCollection dependencies,
|
||||
bool skipHook, ISerializationContext? context = null,
|
||||
SerializationHookContext hookCtx, ISerializationContext? context = null,
|
||||
ISerializationManager.InstantiationDelegate<NPCBlackboard>? instanceProvider = null)
|
||||
{
|
||||
var value = instanceProvider != null ? instanceProvider() : new NPCBlackboard();
|
||||
@@ -68,7 +69,7 @@ public sealed class NPCBlackboardSerializer : ITypeReader<NPCBlackboard, Mapping
|
||||
if (!reflection.TryLooseGetType(typeString, out var type))
|
||||
throw new NullReferenceException($"Found null type for {key}");
|
||||
|
||||
var bbData = serializationManager.Read(type, data.Value, context, skipHook);
|
||||
var bbData = serializationManager.Read(type, data.Value, hookCtx, context);
|
||||
|
||||
if (bbData == null)
|
||||
throw new NullReferenceException($"Found null data for {key}, expected {type}");
|
||||
@@ -80,7 +81,11 @@ public sealed class NPCBlackboardSerializer : ITypeReader<NPCBlackboard, Mapping
|
||||
return value;
|
||||
}
|
||||
|
||||
public void CopyTo(ISerializationManager serializationManager, NPCBlackboard source, ref NPCBlackboard target, bool skipHook,
|
||||
public void CopyTo(
|
||||
ISerializationManager serializationManager,
|
||||
NPCBlackboard source,
|
||||
ref NPCBlackboard target,
|
||||
SerializationHookContext hookCtx,
|
||||
ISerializationContext? context = null)
|
||||
{
|
||||
target.Clear();
|
||||
|
||||
Reference in New Issue
Block a user