Skip to content

Commit

Permalink
use all existing config file vars
Browse files Browse the repository at this point in the history
  • Loading branch information
spencershepard committed Feb 11, 2024
1 parent 2e5c9da commit 372bf02
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Generator/MissionGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def __init__(self, parent=None):
self.user_data = None
self.forces_list = []
self.imports_list = []
self.current_config = None

self.user_data = self.loadUserData()

Expand Down Expand Up @@ -385,6 +386,7 @@ def loadScenarioConfig(self, filename):


def applyScenarioConfig(self, config):
self.current_config = config

# reset some UI elements
self.defense_checkBox.setEnabled(True)
Expand Down Expand Up @@ -457,16 +459,7 @@ def saveScenarioConfig(self):
x = msg.exec_()
if x == QMessageBox.No:
return

config = {}

# get the author, version, map, tags, name, and description from the scenario
config['author'] = self.scenario.author
config['map'] = self.scenario.map_name
config['tags'] = self.scenario.tags
config['name'] = self.scenario.name
config['description'] = self.scenario.description

config = self.current_config

config['checkboxes'] = {}
config['spinboxes'] = {}
Expand Down

0 comments on commit 372bf02

Please sign in to comment.