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.Radar
modifier = self.TraitsImplementing<IRadarColorModifier>().FirstOrDefault();
}
public void PopulateRadarSignatureCells(Actor self, List<Pair<CPos, Color>> destinationBuffer)
public void PopulateRadarSignatureCells(Actor self, List<(CPos Cell, Color Color)> destinationBuffer)
{
var viewer = self.World.RenderPlayer ?? self.World.LocalPlayer;
if (IsTraitDisabled || (viewer != null && !Info.ValidStances.HasStance(self.Owner.Stances[viewer])))
@@ -51,12 +51,12 @@ namespace OpenRA.Mods.Common.Traits.Radar
if (Info.UseLocation)
{
destinationBuffer.Add(Pair.New(self.Location, color));
destinationBuffer.Add((self.Location, color));
return;
}
foreach (var cell in self.OccupiesSpace.OccupiedCells())
destinationBuffer.Add(Pair.New(cell.First, color));
destinationBuffer.Add((cell.Cell, color));
}
}
}