From be971c4a341613c204169ef78775631eb7ea0b17 Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Sun, 27 Jul 2025 21:44:00 +0300 Subject: [PATCH] Mode doesn't need to have terrain defined --- OpenRA.Mods.Common/Lint/CheckInteractable.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Lint/CheckInteractable.cs b/OpenRA.Mods.Common/Lint/CheckInteractable.cs index 5cfa5ab67b..2919bffc37 100644 --- a/OpenRA.Mods.Common/Lint/CheckInteractable.cs +++ b/OpenRA.Mods.Common/Lint/CheckInteractable.cs @@ -31,8 +31,12 @@ namespace OpenRA.Mods.Common.Lint static void Run(Action emitError, Ruleset rules, ModData modData) { + var defaultTerrainInfo = modData.DefaultTerrainInfo; + if (defaultTerrainInfo == null || defaultTerrainInfo.Count == 0) + return; + // As the map has not been created we need to get MapGrid info directly from manifest. - var tileSize = modData.DefaultTerrainInfo.Values.First().TileSize; + var tileSize = defaultTerrainInfo.Values.First().TileSize; var tileScale = modData.Manifest.Get().TileScale; foreach (var actorInfo in rules.Actors) {