Use Tuple syntax

This commit is contained in:
teinarss
2020-08-02 13:41:03 +02:00
committed by Paul Chote
parent 8a74f6ea18
commit 19b02875c7
90 changed files with 738 additions and 826 deletions

View File

@@ -229,16 +229,16 @@ namespace OpenRA.Mods.Common.Traits
public CPos TopLeft { get { return ToCell; } }
public Pair<CPos, SubCell>[] OccupiedCells()
public (CPos, SubCell)[] OccupiedCells()
{
if (FromCell == ToCell)
return new[] { Pair.New(FromCell, FromSubCell) };
return new[] { (FromCell, FromSubCell) };
// HACK: Should be fixed properly, see https://github.com/OpenRA/OpenRA/pull/17292 for an explanation
if (Info.LocomotorInfo.SharesCell)
return new[] { Pair.New(ToCell, ToSubCell) };
return new[] { (ToCell, ToSubCell) };
return new[] { Pair.New(FromCell, FromSubCell), Pair.New(ToCell, ToSubCell) };
return new[] { (FromCell, FromSubCell), (ToCell, ToSubCell) };
}
#endregion