From 9478548bdb29adc9532da2fdedcd1eb7295931d2 Mon Sep 17 00:00:00 2001 From: Ashley Newson Date: Mon, 24 Nov 2025 23:04:56 +0000 Subject: [PATCH] Allow empty MultiBrush with Replaceability.Any Painting a MultiBrush previously required it to be non-empty. When using Replaceability.Any, this is unlikely to be the desire behavior, as some utilities (such as the upcoming LatTiler and RampTiler) may reasonably generate an empty MultiBrush as output. This changes painting MultiBrushes using Replaceability.Any to be effectively no-ops. The .Tile and .Actor cases still use checks, as these still plausibly represent mistakes. --- OpenRA.Mods.Common/MapGenerator/MultiBrush.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/OpenRA.Mods.Common/MapGenerator/MultiBrush.cs b/OpenRA.Mods.Common/MapGenerator/MultiBrush.cs index d77e920e61..b4be1beb9d 100644 --- a/OpenRA.Mods.Common/MapGenerator/MultiBrush.cs +++ b/OpenRA.Mods.Common/MapGenerator/MultiBrush.cs @@ -633,9 +633,6 @@ namespace OpenRA.Mods.Common.MapGenerator case Replaceability.None: throw new ArgumentException("Cannot paint: Replaceability.None"); case Replaceability.Any: - if (this.actorPlans.Count == 0 && tiles.Count == 0) - throw new ArgumentException("Cannot paint: no tiles or actors"); - PaintTiles(map, paintAt, finalHeightOffset, random); PaintActors(map, actorPlans, paintAt);