Compare commits
No commits in common. "c89fde220c141fcdcee7c3b574c24334f1dab092" and "35894c26142a3321b3ad769f5b149f32bb95991c" have entirely different histories.
c89fde220c
...
35894c2614
2 changed files with 2 additions and 14 deletions
|
@ -19,14 +19,7 @@ class Wad(dcc.config.Base):
|
||||||
wcp = self.pwads.joinpath(self.wad).joinpath(self.config_name)
|
wcp = self.pwads.joinpath(self.wad).joinpath(self.config_name)
|
||||||
if wcp.exists():
|
if wcp.exists():
|
||||||
self._wad_config = tomlkit.toml_file.TOMLFile(wcp).read()
|
self._wad_config = tomlkit.toml_file.TOMLFile(wcp).read()
|
||||||
for k,v in self._wad_config.items():
|
self._config.update(self._wad_config.value)
|
||||||
if isinstance(v, dict):
|
|
||||||
if not k in self._config:
|
|
||||||
self._config[k] = {}
|
|
||||||
for sk in v:
|
|
||||||
self._config[k][sk] = v[sk]
|
|
||||||
else:
|
|
||||||
self._config[k] = v
|
|
||||||
|
|
||||||
def run(self, parsed_args):
|
def run(self, parsed_args):
|
||||||
self.wad_init(parsed_args)
|
self.wad_init(parsed_args)
|
||||||
|
|
|
@ -32,11 +32,6 @@ class Text(dcc.doom_base.WadMap):
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
text = None
|
|
||||||
map_names = self._config["map_names"]
|
|
||||||
if map_names is not None:
|
|
||||||
text = map_names[f"map{parsed_args.map}"]
|
|
||||||
if text is None:
|
|
||||||
text = sys.stdin.read().rstrip()
|
text = sys.stdin.read().rstrip()
|
||||||
if not parsed_args.nomap:
|
if not parsed_args.nomap:
|
||||||
text = "MAP{}: {}".format(parsed_args.map, text)
|
text = "MAP{}: {}".format(parsed_args.map, text)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue