diff --git a/qt_ui/windows/QWaitingForMissionResultWindow.py b/qt_ui/windows/QWaitingForMissionResultWindow.py index c35a482e..cf186829 100644 --- a/qt_ui/windows/QWaitingForMissionResultWindow.py +++ b/qt_ui/windows/QWaitingForMissionResultWindow.py @@ -13,8 +13,9 @@ from PySide2.QtWidgets import ( QLabel, QMessageBox, QPushButton, - QTextEdit, + QTextBrowser, ) +from jinja2 import Environment, FileSystemLoader, select_autoescape from game.debriefing import Debriefing, wait_for_debriefing from game.game import Event, Game, logging @@ -65,27 +66,21 @@ class QWaitingForMissionResultWindow(QDialog): self.layout.addWidget(header, 0, 0) self.gridLayout = QGridLayout() - TEXT = "" + \ - "You are clear for takeoff" + \ - "" + \ - "
Then once the mission is loaded in ME, in menu \"Flight\",\n" + \ - "click on FLY Mission to launch.
\n" + \ - "" + \ - "Click on File/Save. Then exit the mission editor, and go to Multiplayer.
" + \ - "Then host a server with the mission, and tell your friends to join !
" + \ - "(The step in the mission editor is important, and fix a game breaking bug.)" + \ - "Once you have played the mission, click on the \"Accept Results\" button.
" + \ - "If DCS Liberation does not detect mission end, use the manually submit button, and choose the state.json file.
" - self.instructions_text = QTextEdit(TEXT) - self.instructions_text.setReadOnly(True) + jinja = Environment( + loader=FileSystemLoader("resources/ui/templates"), + autoescape=select_autoescape( + disabled_extensions=("",), + default_for_string=True, + default=True, + ), + trim_blocks=True, + lstrip_blocks=True, + ) + self.instructions_text = QTextBrowser() + self.instructions_text.setHtml( + jinja.get_template("mission_start_EN.j2").render()) + self.instructions_text.setOpenExternalLinks(True) self.gridLayout.addWidget(self.instructions_text, 1, 0) progress = QLabel("") diff --git a/resources/ui/templates/mission_start_EN.j2 b/resources/ui/templates/mission_start_EN.j2 new file mode 100644 index 00000000..a162635b --- /dev/null +++ b/resources/ui/templates/mission_start_EN.j2 @@ -0,0 +1,58 @@ +You are clear for takeoff + ++ Some player flights may be delayed to start. For such flights, it will not be + possible to enter the cockpit for a delayed flight until its mission start + time, shown in the flight information window. +
+ ++ To reduce delays, schedule packages with player flights with an earlier TOT. + Note that if some flights within the package will take a long time to reach the + target, a player flight may still be delayed. +
+ ++ To avoid delays entirely, use the "Never delay player flights" option in the + mission generation settings. Note that this will not adjust + the timing of your mission; this option only allows you to wait in the + cockpit. +
+ ++ For more information, see the mission planning documentation on + + the wiki. +
+ ++ In DCS, open the Mission Editor and load the file: liberation_nextturn. +
+ ++ Once the mission is loaded in the ME, use the "FLY" option in the "Flight" + menu to launch. +
+ ++ In DCS, open the Mission Editor, and load the file: liberation_nextturn +
+ +Select File/Save, exit the mission editor, and then select Multiplayer.
+ +Then host a server with the mission, and tell your friends to join!
+ +(The step in the mission editor is important, and fix a game breaking bug.) + +Once you have played the mission, click on the \"Accept Results\" button.
+ ++ If DCS Liberation does not detect mission end, use the manually submit button, + and choose the state.json file. +
\ No newline at end of file