diff --git a/project/code/LGS/ResourcePathManager.cs b/project/code/LGS/ResourcePathManager.cs index c557553..eb7b248 100644 --- a/project/code/LGS/ResourcePathManager.cs +++ b/project/code/LGS/ResourcePathManager.cs @@ -114,20 +114,17 @@ public class ResourcePathManager return null; } - public List GetMissionNames() - { - if (!_initialised) return null; - - var names = new List(_omResources.missionPathMap.Keys); - names.Sort(); - return names; - } - public List GetMissionNames(string campaignName) { if (!_initialised) return null; - if (_fmResources.TryGetValue(campaignName, out var campaign)) + if (campaignName == null || campaignName == "") + { + var names = new List(_omResources.missionPathMap.Keys); + names.Sort(); + return names; + } + else if (_fmResources.TryGetValue(campaignName, out var campaign)) { var names = new List(campaign.missionPathMap.Keys); names.Sort(); diff --git a/project/code/TMV/UI/MissionSelector.cs b/project/code/TMV/UI/MissionSelector.cs index b84a15e..ddd4e83 100644 --- a/project/code/TMV/UI/MissionSelector.cs +++ b/project/code/TMV/UI/MissionSelector.cs @@ -77,10 +77,7 @@ public partial class MissionSelector : Control _LoadButton.Disabled = true; var campaignName = _Campaigns.GetItemText((int)idx); - var missionNames = (idx == 0) ? - pathManager.GetMissionNames() : - pathManager.GetMissionNames(campaignName); - + var missionNames = pathManager.GetMissionNames(idx == 0 ? null : campaignName); foreach (var mission in missionNames) { _Missions.AddItem(mission);