def saveFile(self): filename = current_project.settings["workingFile"] if filename != "": self.myMap.save(filename) cmd.updateStackAtSave() if game_init.regenerateInit(): self.myMapExplorerWidget.reloadInitFile()
def saveFileAs(self): filename, extension = QtWidgets.QFileDialog.getSaveFileName( self, 'Save File', os.path.expanduser("~"), 'JSON Game Level (*.map.json)') if filename[0] != "": if filename[-9:] != '.map.json': filename += '.map.json' current_project.settings["workingFile"] = filename self.myMap.save(current_project.settings["workingFile"]) cmd.updateStackAtSave() if game_init.regenerateInit(): self.myMapExplorerWidget.reloadInitFile()