diff --git a/CHANGELOG.md b/CHANGELOG.md index bcc5b2c..5679acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,9 @@ Improvements - **Use TitleContainer for opening streams where possible** - Set GraphicsResource Name when loading assets using RawContentManager +Removals +- Marked features related to Lidgren.Network as obsolete + ## 5.1.0 ### MLEM Additions diff --git a/MLEM.Data/MLEM.Data.csproj b/MLEM.Data/MLEM.Data.csproj index 87438d6..22eeca6 100644 --- a/MLEM.Data/MLEM.Data.csproj +++ b/MLEM.Data/MLEM.Data.csproj @@ -22,6 +22,7 @@ + all diff --git a/MLEM.Data/NetBufferSerializer.cs b/MLEM.Data/NetBufferSerializer.cs index 05f23cf..db49f88 100644 --- a/MLEM.Data/NetBufferSerializer.cs +++ b/MLEM.Data/NetBufferSerializer.cs @@ -10,6 +10,7 @@ namespace MLEM.Data { /// It can be used both for serialization of outgoing packets, and deserialization of incoming packets. /// Before serializing and deserializing an object, each of the object's fields has to have a handler. New handlers can be added using or . /// + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public class NetBufferSerializer { private readonly Dictionary> writeFunctions = new Dictionary>(); diff --git a/MLEM.Data/NetExtensions.cs b/MLEM.Data/NetExtensions.cs index 7149b90..e6adf14 100644 --- a/MLEM.Data/NetExtensions.cs +++ b/MLEM.Data/NetExtensions.cs @@ -19,6 +19,7 @@ namespace MLEM.Data { /// /// The buffer to write to /// The vector to write + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static void Write(this NetBuffer buffer, Vector2 vector) { buffer.Write(vector.X); buffer.Write(vector.Y); @@ -29,6 +30,7 @@ namespace MLEM.Data { /// /// The buffer to read from /// The read vector + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static Vector2 ReadVector2(this NetBuffer buffer) { return new Vector2(buffer.ReadFloat(), buffer.ReadFloat()); } @@ -38,6 +40,7 @@ namespace MLEM.Data { /// /// The buffer to write to /// The guid to write + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static void Write(this NetBuffer buffer, Guid guid) { buffer.Write(guid.ToByteArray()); } @@ -47,6 +50,7 @@ namespace MLEM.Data { /// /// The buffer to read from /// The read guid + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static Guid ReadGuid(this NetBuffer buffer) { return new Guid(buffer.ReadBytes(16)); } @@ -56,6 +60,7 @@ namespace MLEM.Data { /// /// The buffer to write to /// The direction to write + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static void Write(this NetBuffer buffer, Direction2 direction) { buffer.Write((short) direction); } @@ -65,6 +70,7 @@ namespace MLEM.Data { /// /// The buffer to read from /// The read direction + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static Direction2 ReadDirection(this NetBuffer buffer) { return (Direction2) buffer.ReadInt16(); } @@ -76,6 +82,7 @@ namespace MLEM.Data { /// The object to write /// The JSON serializer to use /// The type of object written + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static void WriteObject(this NetBuffer buffer, T obj, JsonSerializer serializer) { if (EqualityComparer.Default.Equals(obj, default)) { buffer.Write(0); @@ -97,6 +104,7 @@ namespace MLEM.Data { /// The JSON serializer to use /// The type of object read /// The read object + [Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")] public static T ReadObject(this NetBuffer buffer, JsonSerializer serializer) { var length = buffer.ReadInt32(); if (length <= 0)