From 1652b4566759177953885ff105b5241013bcded7 Mon Sep 17 00:00:00 2001 From: DegenerateTriangle Date: Fri, 25 Dec 2020 17:22:18 -0500 Subject: [PATCH 1/4] Honor START_LOCATION in default account creation. Currently START_LOCATION is only honored by the "charcreate" command, which is unintuitive. --- evennia/accounts/accounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/evennia/accounts/accounts.py b/evennia/accounts/accounts.py index 79631881db..d8c7ccd735 100644 --- a/evennia/accounts/accounts.py +++ b/evennia/accounts/accounts.py @@ -687,6 +687,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): ip=character_ip, typeclass=character_typeclass, permissions=character_permissions, + location=ObjectDB.objects.get_id(settings.START_LOCATION), **kwargs, ) if character: From 6d70182d53208a67500d58e43ea0ad048e897954 Mon Sep 17 00:00:00 2001 From: DegenerateTriangle Date: Fri, 25 Dec 2020 17:22:23 -0500 Subject: [PATCH 2/4] Update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 6641f347d9..682ebb5dac 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ twistd.bat # never commit docs/build docs/build +pip-wheel-metadata/evennia.dist-info/LICENSE.txt +pip-wheel-metadata/evennia.dist-info/METADATA +pip-wheel-metadata/evennia.dist-info/top_level.txt From bd868f9a13ba43878490732ed6ec91482c7282eb Mon Sep 17 00:00:00 2001 From: DegenerateTriangle Date: Fri, 25 Dec 2020 17:25:30 -0500 Subject: [PATCH 3/4] Revert "Update .gitignore" This reverts commit 6d70182d53208a67500d58e43ea0ad048e897954. --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 682ebb5dac..6641f347d9 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,3 @@ twistd.bat # never commit docs/build docs/build -pip-wheel-metadata/evennia.dist-info/LICENSE.txt -pip-wheel-metadata/evennia.dist-info/METADATA -pip-wheel-metadata/evennia.dist-info/top_level.txt From 152e86a7f35911712419cb95f399bcf588e426e7 Mon Sep 17 00:00:00 2001 From: Tim Chaplin Date: Mon, 18 Jan 2021 16:37:20 -0500 Subject: [PATCH 4/4] Don't override location passed through kwargs --- evennia/accounts/accounts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/evennia/accounts/accounts.py b/evennia/accounts/accounts.py index d8c7ccd735..9bb5acbf29 100644 --- a/evennia/accounts/accounts.py +++ b/evennia/accounts/accounts.py @@ -184,7 +184,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): - at_server_reload() - at_server_shutdown() - """ + """ objects = AccountManager() @@ -680,6 +680,9 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): ) Character = class_from_module(character_typeclass) + if "location" not in kwargs: + kwargs["location"] = ObjectDB.objects.get_id(settings.START_LOCATION) + # Create the character character, errs = Character.create( character_key, @@ -687,7 +690,6 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): ip=character_ip, typeclass=character_typeclass, permissions=character_permissions, - location=ObjectDB.objects.get_id(settings.START_LOCATION), **kwargs, ) if character: