Add GetModelNames method
This commit is contained in:
parent
ef2f87af20
commit
9ae75a693e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue