From 1aac7510434d51b0af9bae9b7bd7eaf12fd6f8d4 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Wed, 11 Dec 2024 17:38:30 +0000 Subject: [PATCH] Error if install config doesn't have resname_base --- KeepersCompound.LGS/ResourcePathManager.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/KeepersCompound.LGS/ResourcePathManager.cs b/KeepersCompound.LGS/ResourcePathManager.cs index 2c761cd..5d90425 100644 --- a/KeepersCompound.LGS/ResourcePathManager.cs +++ b/KeepersCompound.LGS/ResourcePathManager.cs @@ -148,9 +148,13 @@ public class ResourcePathManager } // We need to know where all the texture and object resources are - var zipPaths = new List(); var installCfgLines = File.ReadAllLines(configPaths[(int)ConfigFile.Install]); - FindConfigVar(installCfgLines, "resname_base", out var resPaths); + if (!FindConfigVar(installCfgLines, "resname_base", out var resPaths)) + { + throw new InvalidOperationException("Failed to find resnames in install config"); + } + + var zipPaths = new List(); foreach (var resPath in resPaths.Split('+')) { var dir = Path.Join(installPath, ConvertSeparator(resPath));