Read values out of a config file instead of hardcoding them. Further streamline common tasks in a new base config class.

This commit is contained in:
yrriban 2025-05-17 11:50:59 -04:00
parent 606f27185c
commit 057ac98843
11 changed files with 83 additions and 69 deletions

View file

@ -4,12 +4,12 @@ import subprocess
class Eureka(dcc.doom_base.WadMap):
def take_action(self, parsed_args):
iwad = dcc.config.IwadPath(parsed_args.wad)
pwadpath = dcc.config.PwadPath(parsed_args.wad)
iwad = self.iwad_path(parsed_args.wad)
pwadpath = self.pwads.joinpath(parsed_args.wad)
mw = list(pwadpath.glob('*{}*.wad'.format(parsed_args.wad), case_sensitive=False))
if len(mw) != 1:
raise Exception("Unable to guess at main pwad for wad {}.".format(parsed_args.wad))
complevel = dcc.config.Complevel(parsed_args.wad)
complevel = self.complevel()
port = "vanilla"
if complevel == "9":
port = "boom"