mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
v1.5.3 (#59)
* Update MissionGenerator.py * remove case-sensitivity for tag names * Update RotorOpsMission.py * 1.5.3
This commit is contained in:
parent
fb7f124539
commit
b4ba63253d
@ -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
|
||||
for s in scenarios:
|
||||
if s.map_name and not s.map_name in filter_maps:
|
||||
scenarios.remove(s)
|
||||
filtered_scenarios = []
|
||||
|
||||
# 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()
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
@ -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"]
|
||||
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user