Use Tuple syntax
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user