|
|
@ -52,7 +52,7 @@ def mapSettingsRead(mainDict, maps): |
|
|
mainDict["maps"].update({tempName: tempDict}) |
|
|
mainDict["maps"].update({tempName: tempDict}) |
|
|
tempDict = {} |
|
|
tempDict = {} |
|
|
counter = counter + 1 |
|
|
counter = counter + 1 |
|
|
tempDict["filename"] = maps[i] |
|
|
tempDict["filename"] = "./maps/" + maps[i] |
|
|
else: |
|
|
else: |
|
|
temp = maps[i][2:].split("=") |
|
|
temp = maps[i][2:].split("=") |
|
|
tempDict.update({temp[0]: temp[1]}) |
|
|
tempDict.update({temp[0]: temp[1]}) |
|
|
@ -63,6 +63,29 @@ def mapSettingsRead(mainDict, maps): |
|
|
return mainDict |
|
|
return mainDict |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def gameplaySettingsRead(mainDict, game): |
|
|
|
|
|
tempDict = {} |
|
|
|
|
|
counter = 0 |
|
|
|
|
|
for i in range(len(game)): |
|
|
|
|
|
tempName = "gameplay" + str(counter).zfill(2) |
|
|
|
|
|
print("Examining " + game[i]) |
|
|
|
|
|
|
|
|
|
|
|
if (game[i][:2] != "--"): |
|
|
|
|
|
if len(tempDict) != 0: |
|
|
|
|
|
mainDict["gameplay"].update({tempName: tempDict}) |
|
|
|
|
|
tempDict = {} |
|
|
|
|
|
counter = counter + 1 |
|
|
|
|
|
tempDict["filename"] = "./gameplay/" + game[i] |
|
|
|
|
|
else: |
|
|
|
|
|
temp = game[i][2:].split("=") |
|
|
|
|
|
tempDict.update({temp[0]: temp[1]}) |
|
|
|
|
|
|
|
|
|
|
|
if len(tempDict) != 0: |
|
|
|
|
|
mainDict["gameplay"].update({tempName: tempDict}) |
|
|
|
|
|
|
|
|
|
|
|
return mainDict |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Dynamic Introduction! |
|
|
# Dynamic Introduction! |
|
|
print("So it looks like you wanna play some fuckin\' DOOM!") |
|
|
print("So it looks like you wanna play some fuckin\' DOOM!") |
|
|
print("Checking current directories...") |
|
|
print("Checking current directories...") |
|
|
@ -147,15 +170,14 @@ else: |
|
|
|
|
|
|
|
|
print("Listing everything in Maps...") |
|
|
print("Listing everything in Maps...") |
|
|
print(os.listdir("./maps/")) |
|
|
print(os.listdir("./maps/")) |
|
|
# TODO: Add maps to main dict |
|
|
|
|
|
|
|
|
|
|
|
# Read information from the settings file |
|
|
|
|
|
print("Adding maps to the main dict...") |
|
|
print("Adding maps to the main dict...") |
|
|
settingsDict = mapSettingsRead(settingsDict, mapsSettings) |
|
|
settingsDict = mapSettingsRead(settingsDict, mapsSettings) |
|
|
|
|
|
|
|
|
print("Listing everything in Gameplay...") |
|
|
print("Listing everything in Gameplay...") |
|
|
print(os.listdir("./gameplay/")) |
|
|
print(os.listdir("./gameplay/")) |
|
|
# TODO: Add gameplay WADS to main dict |
|
|
# TODO: Add gameplay WADS to main dict |
|
|
|
|
|
settingsDict = gameplaySettingsRead(settingsDict, gameplaySettings) |
|
|
|
|
|
|
|
|
print("Listing everything in Misc...") |
|
|
print("Listing everything in Misc...") |
|
|
print(os.listdir("./misc/")) |
|
|
print(os.listdir("./misc/")) |
|
|
|