From 022f69962e5c70e1cdc0958fa696c0a677ff3c5e Mon Sep 17 00:00:00 2001 From: NCLanceman Date: Mon, 17 Nov 2025 14:08:53 -0600 Subject: [PATCH] Working on File Processing --- doomstarter.py | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/doomstarter.py b/doomstarter.py index ec4c39d..1336234 100644 --- a/doomstarter.py +++ b/doomstarter.py @@ -3,6 +3,12 @@ import subprocess path = os.getcwd() +gameplaySettings = [] +mapsSettings = [] +miscSettings = [] +sourceSettings = [] +previousSettings = [] + def menuPrinter(list): for i in range(len(list)): @@ -26,8 +32,40 @@ if (os.path.isdir('misc') == False): os.mkdir('misc') # Load Config File -settings = (open("Settings.txt")).read() -print(settings.splitlines()) +settings = ((open("Settings.txt")).read()).splitlines() + +for i in range(len(settings)): + currentSettingGroup = [] + + if (i == "[Source Ports]"): + currentSettingGroup = sourceSettings + elif (i == "[Maps]"): + sourceSettings = currentSettingGroup + currentSettingGroup = mapsSettings + elif (i == "[Gameplay]"): + mapsSettings = currentSettingGroup + currentSettingGroup = gameplaySettings + elif (i == "[Misc]"): + gameplaySettings = currentSettingGroup + currentSettingGroup = miscSettings + elif (i == "[Last Used]"): + miscSettings = currentSettingGroup + currentSettingGroup = previousSettings + else: + currentSettingGroup.append(i) + +previousSettings = currentSettingGroup + +print("Printing Source Settings...") +print(sourceSettings) +print("Printing Maps...") +print(mapsSettings) +print("Printing Gameplay WADs...") +print(gameplaySettings) +print("Printing Misc WADs...") +print(miscSettings) +print("Printing Previous Settings...") +print(previousSettings) # TODO: Throw everything into a dictionary and utilize at runtime