Add unit test asserting that saving, loading & saving the map produces identical output. (#348)

Also fixed PowerProvider violating this.
This commit is contained in:
Pieter-Jan Briers
2019-09-19 13:46:01 +02:00
committed by GitHub
parent 6c97b63e59
commit 35e88ea62c
3 changed files with 64 additions and 2 deletions

View File

@@ -23,6 +23,8 @@ namespace Content.Server.GameObjects.Components.Power
/// <inheritdoc />
public override DrawTypes DrawType { get; protected set; } = DrawTypes.Node;
protected override bool SaveLoad => false;
/// <summary>
/// Variable that determines the range that the power provider will try to supply power to
/// </summary>
@@ -280,7 +282,7 @@ namespace Content.Server.GameObjects.Components.Power
// Stops an APC from trying to connect to itself
if (this == device)
return false;
return (device.Owner.Transform.WorldPosition - Owner.Transform.WorldPosition).LengthSquared <= _range;
}
}