Properly handle overwriting values in a wad-level config.
This only was a problem for values that we were geenerating a property for.
This commit is contained in:
parent
114fec8f7e
commit
366ddf6132
2 changed files with 3 additions and 0 deletions
|
@ -20,6 +20,7 @@ class Base(Command):
|
||||||
self._config_name = parsed_args.config_name
|
self._config_name = parsed_args.config_name
|
||||||
self._config = tomlkit.toml_file.TOMLFile(
|
self._config = tomlkit.toml_file.TOMLFile(
|
||||||
self.doom.joinpath(self.config_name)).read()
|
self.doom.joinpath(self.config_name)).read()
|
||||||
|
|
||||||
self._dsda = self._config.get("dsda")
|
self._dsda = self._config.get("dsda")
|
||||||
if self.dsda is None:
|
if self.dsda is None:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
|
@ -28,6 +29,7 @@ class Base(Command):
|
||||||
for d in ("iwads", "pwads", "demos", "fabricate"):
|
for d in ("iwads", "pwads", "demos", "fabricate"):
|
||||||
self._init_attr([d], d, fn=self.doom.joinpath)
|
self._init_attr([d], d, fn=self.doom.joinpath)
|
||||||
|
|
||||||
|
def finalize(self):
|
||||||
self._init_attr(["thumbnail", "height"], 720)
|
self._init_attr(["thumbnail", "height"], 720)
|
||||||
self._init_attr(["thumbnail", "width"], 1280)
|
self._init_attr(["thumbnail", "width"], 1280)
|
||||||
self._init_attr(["thumbnail", "font"], None)
|
self._init_attr(["thumbnail", "font"], None)
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Wad(dcc.config.Base):
|
||||||
self._config[k][sk] = v[sk]
|
self._config[k][sk] = v[sk]
|
||||||
else:
|
else:
|
||||||
self._config[k] = v
|
self._config[k] = v
|
||||||
|
self.finalize()
|
||||||
|
|
||||||
def run(self, parsed_args):
|
def run(self, parsed_args):
|
||||||
self.wad_init(parsed_args)
|
self.wad_init(parsed_args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue