-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tuxemon.py
executable file
·49 lines (44 loc) · 1.17 KB
/
run_tuxemon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0
# Copyright (c) 2014-2023 William Edwards <[email protected]>, Benjamin Bean <[email protected]>
from argparse import ArgumentParser
if __name__ == "__main__":
from tuxemon import main, prepare
config = prepare.CONFIG
parser = ArgumentParser()
parser.add_argument(
"-m",
"--mod",
dest="mod",
metavar="mymod",
type=str,
nargs="?",
default=None,
help="The mod directory used in the mods directory",
)
parser.add_argument(
"-l",
"--load",
dest="slot",
metavar="1,2,3",
type=int,
nargs="?",
default=None,
help="The index of the save file to load",
)
parser.add_argument(
"-t",
"--test-map",
dest="test_map",
type=str,
nargs="?",
default=None,
help="Skip title screen and load map directly",
)
args = parser.parse_args()
if args.mod:
config.mods.insert(0, args.mod)
if args.test_map:
config.skip_titlescreen = True
config.splash = False
main.main(load_slot=args.slot)