Add a command to invoke eureka for the given wad and map.
This commit is contained in:
parent
70826d4227
commit
7f397f352f
3 changed files with 39 additions and 9 deletions
19
dcc/eureka.py
Normal file
19
dcc/eureka.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import dcc.doom_base
|
||||
import dcc.config
|
||||
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)
|
||||
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)
|
||||
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[0]])
|
Loading…
Add table
Add a link
Reference in a new issue