Replace Robust Vector2 with System.Numerics (#4092)

This commit is contained in:
metalgearsloth
2023-07-08 14:08:26 +10:00
committed by GitHub
parent 6da708f285
commit 7d1ad527d9
337 changed files with 1214 additions and 1132 deletions

View File

@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Reflection;
using Robust.Shared.Log;
using Robust.Shared.Maths;
@@ -79,12 +80,17 @@ namespace Robust.Shared.Serialization
LogSzr = _logManager.GetSawmill("szr");
types.AddRange(AlwaysNetSerializable);
types.Add(typeof(Vector2));
MappedStringSerializer.Initialize();
var settings = new Settings
{
CustomTypeSerializers = new[] {MappedStringSerializer.TypeSerializer}
CustomTypeSerializers = new[]
{
MappedStringSerializer.TypeSerializer,
new Vector2Serializer(),
}
};
_serializer = new Serializer(types, settings);
_serializableTypes = new HashSet<Type>(_serializer.GetTypeMap().Keys);