This repository has been archived by the owner on Oct 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsettings.py
executable file
·81 lines (69 loc) · 2.66 KB
/
settings.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
72
73
74
75
76
77
78
79
80
81
# ##### BEGIN AGPL LICENSE BLOCK #####
# This file is part of SimpleMMO.
#
# Copyright (C) 2011, 2012 Charles Nelson
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# ##### END AGPL LICENSE BLOCK #####
# Global Settings
PROTOCOL = "http"
HOSTNAME = "localhost"
_server_str = "%s://%s:%d"
AUTHSERVERPORT = 1234
CHARSERVERPORT = 1235
MASTERZONESERVERPORT = 1236
METASERVERPORT = 1237
AUTHSERVER = _server_str % (PROTOCOL, HOSTNAME, AUTHSERVERPORT)
CHARSERVER = _server_str % (PROTOCOL, HOSTNAME, CHARSERVERPORT)
ZONESERVER = _server_str % (PROTOCOL, HOSTNAME, MASTERZONESERVERPORT)
METASERVER = _server_str % (PROTOCOL, HOSTNAME, METASERVERPORT)
DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S:%f'
import subprocess
COOKIE_SECRET = subprocess.check_output('git rev-parse HEAD', shell=True).strip()
# Sentry DSN - Needs set up for your instance of Sentry
SENTRY = True
SENTRY_LOG = False # Sending log entries to sentry is slow and high-volume.
SENTRY_PORT = 9000
SENTRY_PUBLIC = '1a5305df80434b039a6e5030116b4c96'
SENTRY_PRIVATE = '28ce65222ae34a87b8a5c52a5d165c7d'
SENTRY_SERVER = _server_str % (PROTOCOL, HOSTNAME, SENTRY_PORT)
_dsn = "%s:%s@%s" % (SENTRY_PUBLIC, SENTRY_PRIVATE, HOSTNAME)
SENTRY_DSN = _server_str % (PROTOCOL, _dsn, 9000) + '/1'
# AGPL Stuff
AGPL_STRING = "BEGIN AGPL LICENSE BLOCK"
SKIP_FOLDERS = ("/.", ".git", ".svn", "/build/", "/srv/")
# AuthServer Settings
ADMINISTRATORS = ['admin']
HASH_ROUNDS = 85219
# ZoneServer Settings
ZONESTARTPORT = 1300
ZONEENDPORT = 1400
ZONESTARTUPTIME = 20
DEFAULT_CHARACTER_ZONE = 'defaultzone'
SUPERVISORD = 'supervisord' # Constant
SUBPROCESS = 'subprocess' # Constant
DOCKER = 'docker' # Constant
START_ZONE_WITH = SUBPROCESS
# ScriptServer Settings
MAX_ZONE_OBJECT_MESSAGE_COUNT = 1000
MAX_DICE_AMOUNT = 100
SCRIPT_PATH = "./games/" # If this is defined, watch it for changes, and reload scripts when this changes.
# Client Settings
CLIENT_TIMEOUT = 10 # Client gives up connecting after 10 seconds.
MSPERSEC = 1000
CLIENT_NETWORK_FPS = 10
CLIENT_UPDATE_FREQ = MSPERSEC/CLIENT_NETWORK_FPS
DEFAULT_USERNAME = "Username"
DEFAULT_PASSWORD = "Password"