diff --git a/Generator/MissionGenerator.py b/Generator/MissionGenerator.py index 4481413..2bd9a51 100644 --- a/Generator/MissionGenerator.py +++ b/Generator/MissionGenerator.py @@ -194,22 +194,22 @@ class Window(QMainWindow, Ui_MainWindow): tags = [] maps = [] if self.actionCaucasus.isChecked(): - maps.append('Caucasus') + maps.append('caucasus') if self.actionPersian_Gulf.isChecked(): - maps.append('PersianGulf') + maps.append('persiangulf') if self.actionMarianas.isChecked(): - maps.append('Marianas') + maps.append('marianas') if self.actionNevada.isChecked(): - maps.append('Nevada') + maps.append('nevada') if self.actionSyria.isChecked(): - maps.append('Syria') + maps.append('syria') if self.actionMultiplayer.isChecked(): - tags.append('MultiPlayer') + tags.append('multiplayer') if self.actionSingle_Player.isChecked(): - tags.append('SinglePlayer') + tags.append('singleplayer') if self.actionCo_Op.isChecked(): - tags.append('CoOp') + tags.append('coop') return maps, tags @@ -259,24 +259,20 @@ class Window(QMainWindow, Ui_MainWindow): #remove scenarios if they don't match filter criteria filter_maps, filter_tags = self.tagsFromMenuOptions() - # remove scenarios if map not selected in menu + filtered_scenarios = [] + for s in scenarios: - if s.map_name and not s.map_name in filter_maps: - scenarios.remove(s) + if s.map_name and s.map_name not in filter_maps: + continue + if s.tags: + for tag in s.tags: + if tag in filter_tags: + filtered_scenarios.append(s) + break + else: + filtered_scenarios.append(s) - # add scenarios if tags match - if len(filter_tags) > 0: - t_scenarios = [] - for s in scenarios: - if s.tags: #if the config file has tags set - for tag in filter_tags: - if tag in s.tags: - t_scenarios.append(s) - else: #add if no tags set - t_scenarios.append(s) - scenarios = t_scenarios.copy() - - self.scenarios_list = sorted(scenarios, key=lambda x: x.name, reverse=False) + self.scenarios_list = filtered_scenarios for s in self.scenarios_list: self.scenario_comboBox.addItem(s.name) diff --git a/Generator/MissionGeneratorTemplates.py b/Generator/MissionGeneratorTemplates.py index d071414..a7cdf17 100644 --- a/Generator/MissionGeneratorTemplates.py +++ b/Generator/MissionGeneratorTemplates.py @@ -29,10 +29,10 @@ class Scenario: if 'name' in config: self.name = config["name"] if 'map' in config: - self.map_name = config["map"] + self.map_name = config["map"].lower() if 'tags' in config: for tag in config['tags']: - self.tags.append(tag) + self.tags.append(tag.lower()) if 'author' in config: self.author = config["author"] diff --git a/Generator/RotorOpsMission.py b/Generator/RotorOpsMission.py index 025c76b..34c40bf 100644 --- a/Generator/RotorOpsMission.py +++ b/Generator/RotorOpsMission.py @@ -816,6 +816,7 @@ class RotorOpsMission: for zone in self.m.triggers.zones(): if zone.name == "RED_CAP_SPAWN": scenario_red_cap_spawn_zone = True + e_cap_spawn_point = zone.point if not scenario_red_cap_spawn_zone: e_cap_spawn_point = primary_e_airport.position.point_from_heading(e_airport_heading, 100000) self.m.triggers.add_triggerzone(e_cap_spawn_point, 30000, hidden=True, name="RED_CAP_SPAWN") diff --git a/Generator/version.py b/Generator/version.py index ce31048..763997b 100644 --- a/Generator/version.py +++ b/Generator/version.py @@ -1,7 +1,7 @@ # ROTOROPS VERSION maj_version = 1 minor_version = 5 -patch_version = 2 +patch_version = 3 version_url = 'https://dcs-helicopters.com/app-updates/versioncheck.yaml' diff --git a/MissionGenerator.exe b/MissionGenerator.exe index 21d5109..05f168a 100644 Binary files a/MissionGenerator.exe and b/MissionGenerator.exe differ