Read COMPLVL lump on initial configuration #9

Merged
yrriban merged 2 commits from iss6 into trunk 2025-11-28 20:18:40 +00:00
2 changed files with 2 additions and 12 deletions
Showing only changes of commit 2d2a5c3ea4 - Show all commits

View file

@ -15,14 +15,9 @@ class Configure(dcc.doom_base.Wad):
if new_config.exists(): if new_config.exists():
raise Exception(f"Config {new_config} already exists.") raise Exception(f"Config {new_config} already exists.")
wads = sorted(
self.pwads.joinpath(self.wad).glob('*.wad', case_sensitive=False),
reverse=True
)
complevel = parsed_args.complevel complevel = parsed_args.complevel
if complevel is None: if complevel is None:
for w in wads: for w in self.load_order():
try: try:
wad = omg.WadIO(w) wad = omg.WadIO(w)
complevel = wad.read("COMPLVL").decode("ascii").strip() complevel = wad.read("COMPLVL").decode("ascii").strip()

View file

@ -12,12 +12,7 @@ class Extract(dcc.doom_base.Wad):
return parser return parser
def take_action(self, parsed_args): def take_action(self, parsed_args):
wads = sorted( for w in self.load_order()
self.pwads.joinpath(self.wad).glob('*.wad', case_sensitive=False),
reverse=True
)
for w in wads:
try: try:
# TODO: handle anything other than graphics. # TODO: handle anything other than graphics.
wad = omg.WadIO(w) wad = omg.WadIO(w)