Support setting options in all cases where dsda is invoked.
Also allow overriding options for the fabricate and record commands.
This commit is contained in:
parent
469d8eb13a
commit
00334120b0
3 changed files with 25 additions and 6 deletions
|
@ -18,13 +18,14 @@ class Fabricate(dcc.doom_base.WadMap):
|
|||
command = [self.dsda]
|
||||
if not parsed_args.fg and shutil.which("xvfb-run") is not None:
|
||||
command = ["xvfb-run"] + command
|
||||
options = []
|
||||
for k, v in self._config.get("fabricate_options", {}).items():
|
||||
list.append(options, f"{k}={v}")
|
||||
if len(options) > 0:
|
||||
options = ["-assign", ",".join(options)]
|
||||
subprocess.run(
|
||||
command + self.dsda_preamble() + options
|
||||
command + self.dsda_preamble()
|
||||
+ ["-timedemo", self.demo_in_path()]
|
||||
+ ["-viddump", self.video_path()]
|
||||
)
|
||||
|
||||
def options_dict(self):
|
||||
opt_dict = super().options_dict()
|
||||
for k, v in self._config.get("fabricate_options", {}).items():
|
||||
opt_dict[k] = v
|
||||
return opt_dict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue