path manager now returns alphabetically sorted lists
This commit is contained in:
parent
3d41441f2a
commit
68f2a851f4
|
@ -84,11 +84,13 @@ public class ResourcePathManager
|
|||
return false;
|
||||
}
|
||||
|
||||
public string[] GetCampaignNames()
|
||||
public List<string> GetCampaignNames()
|
||||
{
|
||||
if (!_initialised) return null;
|
||||
|
||||
return _fmResources.Keys.ToArray();
|
||||
var names = new List<string>(_fmResources.Keys);
|
||||
names.Sort();
|
||||
return names;
|
||||
}
|
||||
|
||||
public string GetMissionPath(string missionName)
|
||||
|
@ -114,20 +116,24 @@ public class ResourcePathManager
|
|||
return null;
|
||||
}
|
||||
|
||||
public string[] GetMissionNames()
|
||||
public List<string> GetMissionNames()
|
||||
{
|
||||
if (!_initialised) return null;
|
||||
|
||||
return _omResources.missionPathMap.Keys.ToArray();
|
||||
var names = new List<string>(_omResources.missionPathMap.Keys);
|
||||
names.Sort();
|
||||
return names;
|
||||
}
|
||||
|
||||
public string[] GetMissionNames(string campaignName)
|
||||
public List<string> GetMissionNames(string campaignName)
|
||||
{
|
||||
if (!_initialised) return null;
|
||||
|
||||
if (_fmResources.TryGetValue(campaignName, out var campaign))
|
||||
{
|
||||
return campaign.missionPathMap.Keys.ToArray();
|
||||
var names = new List<string>(campaign.missionPathMap.Keys);
|
||||
names.Sort();
|
||||
return names;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue