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
|
@ -58,6 +58,17 @@ class Wad(dcc.config.Base):
|
|||
wads = [self.pwad_path.joinpath(wad) for wad in wads]
|
||||
return wads
|
||||
|
||||
def options_dict(self):
|
||||
return self._config.get("options", {})
|
||||
|
||||
def options(self):
|
||||
options = []
|
||||
for k, v in self.options_dict().items():
|
||||
list.append(options, f"{k}={v}")
|
||||
if len(options) > 0:
|
||||
return ["-assign", ",".join(options)]
|
||||
return []
|
||||
|
||||
|
||||
class WadMap(Wad):
|
||||
def get_parser(self, prog_name):
|
||||
|
@ -95,6 +106,7 @@ class WadMap(Wad):
|
|||
args = args + ["-complevel", str(self.complevel())]
|
||||
args = args + ["-skill", "4"]
|
||||
args = args + ["-warp", self.map]
|
||||
args = args + self.options()
|
||||
return args
|
||||
|
||||
def complevel(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue