forked from Tuxemon/Tuxemon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtuxemon.py
executable file
·59 lines (52 loc) · 2.06 KB
/
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
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Tuxemon
# Copyright (C) 2014, William Edwards <shadowapex@gmail.com>,
# Benjamin Bean <superman2k5@gmail.com>
#
# This file is part of Tuxemon.
#
# Tuxemon is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Tuxemon is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Tuxemon. If not, see <http://www.gnu.org/licenses/>.
#
# Contributor(s):
#
# William Edwards <shadowapex@gmail.com>
#
#
# txmn.py Main game
#
"""Starts the core.main.main() function which, in turn, initializes
pygame and starts the game, unless headless is specified.
To run an individual component (e.g. core/prepare.py):
`python -m core.prepare`
"""
from argparse import ArgumentParser
if __name__ == '__main__':
print('this file will be removed in the future and replaced with "run_tuxemon.py"')
print()
from tuxemon.core import prepare, main
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('-s', '--starting-map', dest='starting_map', metavar='map.tmx', type=str, nargs='?',
default=None, help='The starting map')
args = parser.parse_args()
if args.mod:
prepare.CONFIG.mods.insert(0, args.mod)
if args.starting_map:
prepare.CONFIG.starting_map = args.starting_map
main.main(load_slot=args.slot)