From 114fec8f7ead4f6e93dc2ebe4289f1b2148ae0ec Mon Sep 17 00:00:00 2001 From: yrriban Date: Wed, 23 Jul 2025 18:26:11 -0400 Subject: [PATCH] Fix the extract command to work with the new nested config classes. --- dcc/extract.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dcc/extract.py b/dcc/extract.py index 8d38289..a61b446 100644 --- a/dcc/extract.py +++ b/dcc/extract.py @@ -1,14 +1,13 @@ -import dcc.config +import dcc.doom_base import omg import numpy as np import wand.color import wand.image -class Extract(dcc.config.base): +class Extract(dcc.doom_base.Wad): def get_parser(self, prog_name): parser = super().get_parser(prog_name) - parser.add_argument('wad') parser.add_argument('lump') return parser @@ -30,17 +29,17 @@ class Extract(dcc.config.base): ) as img: img.transparent_color(wand.color.Color("#ff00ff"), 0.0) img.save( - filename=self.output.joinpath(parsed_args.wad) + filename=self.fabricate.joinpath(parsed_args.wad) .joinpath(parsed_args.lump + ".png") ) return except Exception as e: print( - f"Wad {w} likely has no lump {parsed_args.lump}" + f"Wad {w} likely has no lump {parsed_args.lump} " + f"(exception {e})." ) print( - "Lump {parsed_args.lump} not found in any wad in" + "Lump {parsed_args.lump} not found in any wad in " + f"{parsed_args.wad}" )