Add GetModelNames method

This commit is contained in:
Jarrod Doyle 2024-09-05 17:31:59 +01:00
parent ef2f87af20
commit 9ae75a693e
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 19 additions and 0 deletions

View File

@ -142,6 +142,25 @@ public class ResourcePathManager
return null;
}
public List<string> GetModelNames(string campaignName)
{
if (!_initialised) return null;
if (campaignName == null || campaignName == "")
{
var names = new List<string>(_omResources.objectPathMap.Keys);
names.Sort();
return names;
}
else if (_fmResources.TryGetValue(campaignName, out var campaign))
{
var names = new List<string>(campaign.objectPathMap.Keys);
names.Sort();
return names;
}
return null;
}
// TODO: OMs fail to find a path, but FMs using OM textures do find them
// The OMs still fail even if I put them in a folder with FMs that work=??
public string GetTexturePath(string campaignName, string textureName)