mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 13:56:30 +01:00
Allow for changing the home location of new characters by changing a setting. The given location must exist and is given as a dbref. If one wants more advanced control over start locations, one needs to customize the unloggedin/create command to match the particular game. Resolves issue 178.
This commit is contained in:
parent
2059fd9701
commit
16affc284b
5 changed files with 9 additions and 7 deletions
|
|
@ -655,8 +655,7 @@ class ObjectDB(TypedObject):
|
|||
if self.home:
|
||||
source_location = self.home
|
||||
else:
|
||||
default_home_id = ServerConfig.objects.conf("default_home")
|
||||
default_home = ObjectDB.objects.get_id(default_home_id)
|
||||
default_home = ObjectDB.objects.get_id(settings.CHARACTER_DEFAULT_HOME)
|
||||
source_location = default_home
|
||||
|
||||
# Call hook on source location
|
||||
|
|
@ -738,7 +737,7 @@ class ObjectDB(TypedObject):
|
|||
"""
|
||||
# Gather up everything that thinks this is its location.
|
||||
objs = ObjectDB.objects.filter(db_location=self)
|
||||
default_home_id = int(ServerConfig.objects.conf('default_home'))
|
||||
default_home_id = int(settings.CHARACTER_DEFAULT_HOME)
|
||||
try:
|
||||
default_home = ObjectDB.objects.get(id=default_home_id)
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue