--gamedir doesn't work as GAMEDIR gets overwritten
Whether altgamedir from argparse has set GAMEDIR or not, the GAMEDIR is set based on the present working directory. This stops evennia --gamedir /some/path/not/the/pwd from having any effect (tested in podman with docker.io/evennia/evennia:latest
This commit is contained in:
parent
6117e85ac9
commit
5de3299731
1 changed files with 5 additions and 2 deletions
|
|
@ -1787,8 +1787,11 @@ def init_game_directory(path, check_db=True, need_gamedir=True):
|
||||||
be run in a valid game directory.
|
be run in a valid game directory.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# set the GAMEDIR path
|
global GAMEDIR
|
||||||
if need_gamedir:
|
# Set the GAMEDIR path if not set already
|
||||||
|
## Declaring it global doesn't set the variable
|
||||||
|
## This check is needed for evennia --gamedir to work
|
||||||
|
if need_gamedir and 'GAMEDIR' not in globals():
|
||||||
set_gamedir(path)
|
set_gamedir(path)
|
||||||
|
|
||||||
# Add gamedir to python path
|
# Add gamedir to python path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue