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

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
[Sync]
readonly WPos position;
readonly Pair<CPos, SubCell>[] occupied;
readonly (CPos, SubCell)[] occupied;
public Immobile(ActorInitializer init, ImmobileInfo info)
{
@@ -47,14 +47,14 @@ namespace OpenRA.Mods.Common.Traits
position = init.World.Map.CenterOfCell(location);
if (info.OccupiesSpace)
occupied = new[] { Pair.New(TopLeft, SubCell.FullCell) };
occupied = new[] { (TopLeft, SubCell.FullCell) };
else
occupied = new Pair<CPos, SubCell>[0];
occupied = new (CPos, SubCell)[0];
}
public CPos TopLeft { get { return location; } }
public WPos CenterPosition { get { return position; } }
public Pair<CPos, SubCell>[] OccupiedCells() { return occupied; }
public (CPos, SubCell)[] OccupiedCells() { return occupied; }
void INotifyAddedToWorld.AddedToWorld(Actor self)
{