Made GAME_DIR allocation dynamic to allow for renaming/moving the gamedir if desired.

This commit is contained in:
Griatch 2015-02-11 13:57:19 +01:00
parent eb6baf6e79
commit 53a100fd33
2 changed files with 1 additions and 2 deletions

View file

@ -24,7 +24,7 @@ SERVERNAME = {servername}
# Path to the game directory (use EVENNIA_DIR to refer to the
# core evennia library)
GAME_DIR = {game_dir}
GAME_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Place to put log files
LOG_DIR = os.path.join(GAME_DIR, "server", "logs")

View file

@ -416,7 +416,6 @@ def create_settings_file():
# tweak the settings
setting_dict = {"settings_default": os.path.join(EVENNIA_LIB, "settings_default.py"),
"servername":"\"%s\"" % GAMEDIR.rsplit(os.path.sep, 1)[1].capitalize(),
"game_dir":"\"%s\"" % GAMEDIR,
"secret_key":"\'%s\'" % create_secret_key()}
# modify the settings