mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix Box2Serializer and tests
This commit is contained in:
@@ -58,10 +58,10 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations
|
||||
ISerializationContext? context = null)
|
||||
{
|
||||
var nodeValue =
|
||||
$"{value.Bottom.ToString(CultureInfo.InvariantCulture)}," +
|
||||
$"{value.Left.ToString(CultureInfo.InvariantCulture)}," +
|
||||
$"{value.Top.ToString(CultureInfo.InvariantCulture)}," +
|
||||
$"{value.Right.ToString(CultureInfo.InvariantCulture)}";
|
||||
$"{value.Bottom.ToString(CultureInfo.InvariantCulture)}," +
|
||||
$"{value.Right.ToString(CultureInfo.InvariantCulture)}," +
|
||||
$"{value.Top.ToString(CultureInfo.InvariantCulture)}";
|
||||
|
||||
return new ValueDataNode(nodeValue);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers
|
||||
var bottom = -2;
|
||||
var right = -3;
|
||||
var top = 4;
|
||||
var str = $"{bottom},{left},{top},{right}";
|
||||
var str = $"{left},{bottom},{right},{top}";
|
||||
var box = new Box2(left, bottom, right, top);
|
||||
var node = Serialization.WriteValueAs<ValueDataNode>(box);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers
|
||||
var bottom = -2;
|
||||
var right = -3;
|
||||
var top = 4;
|
||||
var str = $"{bottom},{left},{top},{right}";
|
||||
var str = $"{left},{bottom},{right},{top}";
|
||||
var node = new ValueDataNode(str);
|
||||
var deserializedBox = Serialization.ReadValueOrThrow<Box2>(node);
|
||||
var box = new Box2(left, bottom, right, top);
|
||||
|
||||
Reference in New Issue
Block a user