Ejemplo n.º 1
0
    def saveGame(self):
        logging.info("Saving game")

        if self.game.savepath:
            persistency.save_game(self.game)
            GameUpdateSignal.get_instance().updateGame(self.game)
        else:
            self.saveGameAs()
Ejemplo n.º 2
0
    def saveGame(self):
        logging.info("Saving game")

        if self.game.savepath:
            persistency.save_game(self.game)
            liberation_install.setup_last_save_file(self.game.savepath)
            liberation_install.save_config()
        else:
            self.saveGameAs()
Ejemplo n.º 3
0
 def saveGameAs(self):
     file = QFileDialog.getSaveFileName(
         self,
         "Save As",
         dir=persistency._dcs_saved_game_folder,
         filter="*.liberation")
     if file is not None:
         self.game.savepath = file[0]
         persistency.save_game(self.game)
Ejemplo n.º 4
0
 def saveGameAs(self):
     file = QFileDialog.getSaveFileName(
         self,
         "Save As",
         dir=persistency._dcs_saved_game_folder,
         filter="*.liberation",
     )
     if file is not None:
         self.game.savepath = file[0]
         persistency.save_game(self.game)
         liberation_install.setup_last_save_file(self.game.savepath)
         liberation_install.save_config()
Ejemplo n.º 5
0
    def saveGameAs(self):
        if self.game is not None and self.game.savepath:
            save_dir = self.game.savepath
        else:
            save_dir = str(persistency.save_dir())
        file = QFileDialog.getSaveFileName(
            self,
            "Save As",
            dir=save_dir,
            filter="*.liberation",
        )
        if file is not None:
            self.game.savepath = file[0]
            persistency.save_game(self.game)
            liberation_install.setup_last_save_file(self.game.savepath)
            liberation_install.save_config()

            self.updateWindowTitle(file[0])