Improve spawnpoint lint
This commit is contained in:
committed by
Matthias Mailänder
parent
f344ccb714
commit
b5ef9c29cf
@@ -92,8 +92,9 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
if (playerCount > spawnPoints.Length)
|
if (playerCount > spawnPoints.Length)
|
||||||
emitError($"The map allows {playerCount} possible players, but defines only {spawnPoints.Length} spawn points.");
|
emitError($"The map allows {playerCount} possible players, but defines only {spawnPoints.Length} spawn points.");
|
||||||
|
|
||||||
if (spawnPoints.Distinct().Count() != spawnPoints.Length)
|
foreach (var spawn in spawnPoints.GroupBy(x => x))
|
||||||
emitError("Duplicate spawn point locations detected.");
|
if (spawn.Count() > 1)
|
||||||
|
emitError($"Duplicate spawn point location detected at `{spawn.Key}`.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user