Made GAME_DIR allocation dynamic to allow for renaming/moving the gamedir if desired.
This commit is contained in:
parent
eb6baf6e79
commit
53a100fd33
2 changed files with 1 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ SERVERNAME = {servername}
|
||||||
|
|
||||||
# Path to the game directory (use EVENNIA_DIR to refer to the
|
# Path to the game directory (use EVENNIA_DIR to refer to the
|
||||||
# core evennia library)
|
# 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
|
# Place to put log files
|
||||||
LOG_DIR = os.path.join(GAME_DIR, "server", "logs")
|
LOG_DIR = os.path.join(GAME_DIR, "server", "logs")
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,6 @@ def create_settings_file():
|
||||||
# tweak the settings
|
# tweak the settings
|
||||||
setting_dict = {"settings_default": os.path.join(EVENNIA_LIB, "settings_default.py"),
|
setting_dict = {"settings_default": os.path.join(EVENNIA_LIB, "settings_default.py"),
|
||||||
"servername":"\"%s\"" % GAMEDIR.rsplit(os.path.sep, 1)[1].capitalize(),
|
"servername":"\"%s\"" % GAMEDIR.rsplit(os.path.sep, 1)[1].capitalize(),
|
||||||
"game_dir":"\"%s\"" % GAMEDIR,
|
|
||||||
"secret_key":"\'%s\'" % create_secret_key()}
|
"secret_key":"\'%s\'" % create_secret_key()}
|
||||||
|
|
||||||
# modify the settings
|
# modify the settings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue