Use HashSets instead of .Distinct
And don't cast to array / list where unnecessary
This commit is contained in:
@@ -168,8 +168,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||
metadata.AppendLine();
|
||||
|
||||
metadata.AppendLine("Terrain:");
|
||||
terrainTypes = terrainTypes.Distinct().ToArray();
|
||||
foreach (var terrainType in terrainTypes)
|
||||
foreach (var terrainType in terrainTypes.Distinct())
|
||||
{
|
||||
metadata.AppendLine($"\tTerrainType@{terrainType}:");
|
||||
metadata.AppendLine($"\t\tType: {terrainType}");
|
||||
|
||||
Reference in New Issue
Block a user