Add websocket event stream for sim updates.

As a proof of concept this only covers the flight positions.
This commit is contained in:
Dan Albert
2022-02-16 01:28:10 -08:00
parent 350f08be2f
commit 21f7912458
14 changed files with 150 additions and 15 deletions

View File

@@ -20,6 +20,7 @@ from PySide2.QtWidgets import (
import qt_ui.uiconstants as CONST
from game import Game, VERSION, persistency
from game.debriefing import Debriefing
from game.server import EventStream
from qt_ui import liberation_install
from qt_ui.dialogs import Dialog
from qt_ui.models import GameModel
@@ -50,6 +51,7 @@ class QLiberationWindow(QMainWindow):
self.game = game
self.sim_controller = SimController(self.game)
self.sim_controller.sim_update.connect(EventStream.put_nowait)
self.game_model = GameModel(game, self.sim_controller)
Dialog.set_game(self.game_model)
self.ato_panel = QAirTaskingOrderPanel(self.game_model)