30 lines
883 B
Python
30 lines
883 B
Python
import dcc.doom_base
|
|
import dcc.config
|
|
import subprocess
|
|
|
|
|
|
class Eureka(dcc.doom_base.WadMap):
|
|
def get_parser(self, prog_name):
|
|
parser = super().get_parser(prog_name)
|
|
parser.add_argument("--main")
|
|
return parser
|
|
|
|
def take_action(self, parsed_args):
|
|
iwad = self.iwad_path
|
|
pwadpath = self.pwads.joinpath(parsed_args.wad)
|
|
if parsed_args.main is not None:
|
|
mw = pwadpath.joinpath(parsed_args.main)
|
|
else:
|
|
mw = sorted(list(pwadpath.glob('*.wad', case_sensitive=False)))[0]
|
|
|
|
complevel = self.complevel()
|
|
port = "vanilla"
|
|
if complevel == "9":
|
|
port = "boom"
|
|
if complevel == "11" or complevel == "21":
|
|
port = "mbf"
|
|
|
|
subprocess.run(
|
|
["eureka"] + ["-iwad", iwad] + ["-w", parsed_args.map]
|
|
+ ["-p", port] + [mw]
|
|
)
|