diff --git a/OpenRA.Game/CPos.cs b/OpenRA.Game/CPos.cs index 67113c527b..c889637992 100644 --- a/OpenRA.Game/CPos.cs +++ b/OpenRA.Game/CPos.cs @@ -58,7 +58,13 @@ namespace OpenRA public bool Equals(CPos other) { return Bits == other.Bits; } public override bool Equals(object obj) { return obj is CPos && Equals((CPos)obj); } - public override string ToString() { return X + "," + Y; } + public override string ToString() + { + if (Layer == 0) + return X + "," + Y; + + return X + "," + Y + "," + Layer; + } public MPos ToMPos(Map map) { diff --git a/OpenRA.Game/Map/CellRegion.cs b/OpenRA.Game/Map/CellRegion.cs index a61504b8cb..8fb3936924 100644 --- a/OpenRA.Game/Map/CellRegion.cs +++ b/OpenRA.Game/Map/CellRegion.cs @@ -50,6 +50,11 @@ namespace OpenRA BottomRight = bottomRight.ToCPos(gridType); } + public override string ToString() + { + return $"{TopLeft}->{BottomRight}"; + } + /// Expand the specified region with an additional cordon. This may expand the region outside the map borders. public static CellRegion Expand(CellRegion region, int cordon) { diff --git a/OpenRA.Game/Map/MapCoordsRegion.cs b/OpenRA.Game/Map/MapCoordsRegion.cs index 222b4129fb..c2720833f8 100644 --- a/OpenRA.Game/Map/MapCoordsRegion.cs +++ b/OpenRA.Game/Map/MapCoordsRegion.cs @@ -67,6 +67,11 @@ namespace OpenRA bottomRight = mapBottomRight; } + public override string ToString() + { + return $"{TopLeft}->{BottomRight}"; + } + public MapCoordsEnumerator GetEnumerator() { return new MapCoordsEnumerator(this);