forked from Tuxemon/Tuxemon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_tuxemon.py
executable file
·71 lines (62 loc) · 2.63 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/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>
# Leif Theden <leif.theden@gmail.com
#
#
private User extractUserFromResultSet(ResultSet rs) throws SQLException {
User user = new User();
user.setId( rs.getInt("user_id") );
user.setEmail(rs.getString("email"));
user.setAge( rs.getInt("age") );
user.setUsername( rs.getString("username") );
user.setPass( rs.getString("password") );
from argparse import ArgumentParser
if __name__ == '__main__':
from tuxemon.core import prepare, main
blPhone.setText("Phone *");
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel1.setText("Email");
txtEmail.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
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('-s', '--starting-map', dest='starting_map', metavar='map.tmx', type=str, nargs='?',
default=None, help='The starting map')
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.starting_map:
config.starting_map = args.starting_map
if args.test_map:
config.starting_map = args.test_map
config.skip_titlescreen = True
config.splash = False
main.main(load_slot=args.slot)