Add command line arg to run rando with no UI for testing
@@ -41,6 +41,7 @@ class WWRandomizerWindow(QMainWindow):
self.cmd_line_args = cmd_line_args
self.bulk_test = ("-bulk" in cmd_line_args)
+ self.no_ui_test = ("-noui" in cmd_line_args)
self.custom_color_selector_buttons = OrderedDict()
self.custom_color_selector_hex_inputs = OrderedDict()
@@ -109,6 +110,10 @@ class WWRandomizerWindow(QMainWindow):
# Hide unfinished options from the GUI (still accessible via settings.txt).
self.ui.randomize_bgm.hide()
+ if self.no_ui_test:
+ self.randomize()
+ return
+
self.show()
if not IS_RUNNING_FROM_SOURCE:
@@ -258,6 +263,10 @@ class WWRandomizerWindow(QMainWindow):
def randomization_complete(self):
self.progress_dialog.reset()
+ if self.no_ui_test:
+ self.close()
+ return
+
text = """Randomization complete.<br><br>
If you get stuck, check the progression spoiler log in the output folder."""
