serv4 + submodule update (#12740)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -39,10 +39,12 @@ public sealed class HTNTaskListSerializer : ITypeSerializer<List<string>, Sequen
|
||||
return new ValidatedSequenceNode(list);
|
||||
}
|
||||
|
||||
public List<string> Read(ISerializationManager serializationManager, SequenceDataNode node, IDependencyCollection dependencies,
|
||||
bool skipHook, ISerializationContext? context = null, List<string>? value = default)
|
||||
public List<string> Read(ISerializationManager serializationManager, SequenceDataNode node,
|
||||
IDependencyCollection dependencies,
|
||||
bool skipHook, ISerializationContext? context = null,
|
||||
ISerializationManager.InstantiationDelegate<List<string>>? instanceProvider = null)
|
||||
{
|
||||
value ??= new List<string>();
|
||||
var value = instanceProvider != null ? instanceProvider() : new List<string>();
|
||||
foreach (var data in node.Sequence)
|
||||
{
|
||||
var mapping = (MappingDataNode) data;
|
||||
@@ -72,15 +74,4 @@ public sealed class HTNTaskListSerializer : ITypeSerializer<List<string>, Sequen
|
||||
|
||||
return sequence;
|
||||
}
|
||||
|
||||
public List<string> Copy(ISerializationManager serializationManager, List<string> source, List<string> target, bool skipHook,
|
||||
ISerializationContext? context = null)
|
||||
{
|
||||
target.Clear();
|
||||
target.EnsureCapacity(source.Capacity);
|
||||
|
||||
// Tasks are just prototypes soooo?
|
||||
target.AddRange(source);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user