Error if install config doesn't have resname_base

This commit is contained in:
Jarrod Doyle 2024-12-11 17:38:30 +00:00
parent ad08d373b7
commit 1aac751043
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 6 additions and 2 deletions

View File

@ -148,9 +148,13 @@ public class ResourcePathManager
}
// We need to know where all the texture and object resources are
var zipPaths = new List<string>();
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<string>();
foreach (var resPath in resPaths.Split('+'))
{
var dir = Path.Join(installPath, ConvertSeparator(resPath));