mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
One more consistency fix.
This commit is contained in:
parent
52d7a43bc6
commit
d37da87078
1 changed files with 7 additions and 0 deletions
|
|
@ -139,6 +139,12 @@ class Server(dispatcher):
|
|||
"""
|
||||
BEGIN GENERAL METHODS
|
||||
"""
|
||||
def add_object_to_cache(self, object):
|
||||
"""
|
||||
Adds an object to the cached object list.
|
||||
"""
|
||||
self.object_list[object.id] = object
|
||||
|
||||
def get_object_from_dbref(self, dbref):
|
||||
"""
|
||||
Returns an object when given a dbref.
|
||||
|
|
@ -165,6 +171,7 @@ class Server(dispatcher):
|
|||
# Create a player object of the same ID in the Objects table.
|
||||
user_object = Object(id=uid, type=1, name=uname, location=start_room_obj)
|
||||
user_object.save()
|
||||
self.add_object_to_cache(user_object)
|
||||
|
||||
# Activate the player's session and set them loose.
|
||||
session.login(user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue