From 321342c48ccda4d51804d7f369a973799bf4ff40 Mon Sep 17 00:00:00 2001 From: NCLanceman Date: Wed, 12 Nov 2025 21:29:03 -0600 Subject: [PATCH] menu beginnings --- Settings.txt | 16 ++++++++++++++++ doomstarter.py | 28 ++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 Settings.txt diff --git a/Settings.txt b/Settings.txt new file mode 100644 index 0000000..9fe26e6 --- /dev/null +++ b/Settings.txt @@ -0,0 +1,16 @@ +[Source Ports] +Woof! +--"runcommand"="~/Games/Woof/woof/build/src/woof" +UZDoom +--"runcommand"="uzdoom-alpha" +DSDA-Doom +Chocolate Doom + +[Maps] + +[Gameplay] + +[Misc] + +[Last Used] + diff --git a/doomstarter.py b/doomstarter.py index 3a96e45..ec4c39d 100644 --- a/doomstarter.py +++ b/doomstarter.py @@ -3,6 +3,12 @@ import subprocess path = os.getcwd() + +def menuPrinter(list): + for i in range(len(list)): + print(str(i) + ": " + list[i]) + + # Dynamic Introduction! print("So it looks like you wanna play some fuckin\' DOOM!") @@ -19,6 +25,11 @@ if (os.path.isdir('misc') == False): print("Making Misc Folder...") os.mkdir('misc') +# Load Config File +settings = (open("Settings.txt")).read() +print(settings.splitlines()) +# TODO: Throw everything into a dictionary and utilize at runtime + # Detect SourcePorts # Source Port list: GZDoom, UZDoom, ChocolateDoom, DSDA-Doom, Woof! @@ -33,11 +44,24 @@ sourceport_dict = { print("The command for running UZDoom is: " + sourceport_dict["UZDoom"]["runcommand"]) -print("Running UZDoom with no arguements...") -subprocess.run(sourceport_dict["UZDoom"]["runcommand"], shell=True) +# print("Running UZDoom with no arguements...") +# subprocess.run(sourceport_dict["UZDoom"]["runcommand"] +# + " ./gameplay/PVT_STONE_V12_5.wad", shell = True) # subprocess.run(sourceport_dict["Woof"]["runcommand"], shell=True) # List all that stuff in a file +print("Listing everything in Maps...") +print(os.listdir("./maps/")) + +print("Listing everything in Gameplay...") +print(os.listdir("./gameplay/")) + +print("Listing everything in Misc...") +print(os.listdir("./misc/")) + + +print("Sample Maps listing: ") +menuPrinter(os.listdir("./maps/")) # Store last configs for later use