Fixed logging issues and SEAD flights departing without waiting.

This commit is contained in:
Khopa
2020-06-22 23:20:14 +02:00
parent 56cf6bdaa4
commit 93a4463f22
10 changed files with 94 additions and 58 deletions

View File

@@ -1,3 +1,9 @@
from userdata import logging_config
# Logging setup
VERSION_STRING = "2.0RC7"
logging_config.init_logging(VERSION_STRING)
import logging
import os
import sys
@@ -11,7 +17,7 @@ from qt_ui import uiconstants
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
from qt_ui.windows.QLiberationWindow import QLiberationWindow
from qt_ui.windows.preferences.QLiberationFirstStartWindow import QLiberationFirstStartWindow
from userdata import liberation_install, persistency, logging_config
from userdata import liberation_install, persistency
if __name__ == "__main__":
@@ -21,9 +27,8 @@ if __name__ == "__main__":
with open("./resources/stylesheets/style.css") as stylesheet:
app.setStyleSheet(stylesheet.read())
# Logging setup
VERSION_STRING = "2.0RC7"
logging_config.init_logging(VERSION_STRING)
# Inject custom payload in pydcs framework
custom_payloads = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..\\resources\\customized_payloads")

View File

@@ -1,3 +1,4 @@
import logging
import sys
import webbrowser
@@ -163,12 +164,12 @@ class QLiberationWindow(QMainWindow):
wizard.accepted.connect(lambda: self.onGameGenerated(wizard.generatedGame))
def saveGame(self):
print("Saving game")
logging.info("Saving game")
persistency.save_game(self.game)
GameUpdateSignal.get_instance().updateGame(self.game)
def onGameGenerated(self, game: Game):
print("On Game generated")
logging.info("On Game generated")
self.game = game
GameUpdateSignal.get_instance().updateGame(self.game)
@@ -198,7 +199,7 @@ class QLiberationWindow(QMainWindow):
about.setWindowTitle("About DCS Liberation")
about.setIcon(QMessageBox.Icon.Information)
about.setText(text)
print(about.textFormat())
logging.info(about.textFormat())
about.exec_()
def showLiberationDialog(self):
@@ -206,6 +207,6 @@ class QLiberationWindow(QMainWindow):
self.subwindow.show()
def onDebriefing(self, debrief: DebriefingSignal):
print("On Debriefing")
logging.info("On Debriefing")
self.debriefing = QDebriefingWindow(debrief.debriefing, debrief.gameEvent, debrief.game)
self.debriefing.show()