From fafa219d11a39ae01a2d122eb0bc975339672880 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 24 Oct 2019 13:40:55 +0200 Subject: [PATCH] Added error message if color could not be adjusted The failsafe in ColorValidator aborts after 255 iterations of adjusting the color and picks a random color. This message makes it clearer to the user. Results in two messages being displayed, first one about adjusting and the about a random color pick. --- OpenRA.Mods.Common/ColorValidator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenRA.Mods.Common/ColorValidator.cs b/OpenRA.Mods.Common/ColorValidator.cs index 85767f3dd7..2eb8ff3a07 100644 --- a/OpenRA.Mods.Common/ColorValidator.cs +++ b/OpenRA.Mods.Common/ColorValidator.cs @@ -161,6 +161,7 @@ namespace OpenRA.Mods.Common if (attempt >= 255) { color = RandomPresetColor(random, terrainColors, playerColors); + onError("Color could not be adjusted enough, a new color has been picked."); break; }