Migration needed. Refactored the config.configValue model into server.ServerConfig (that's what the config model were used for anyway). The new model can handle arbitrary data structures through pickle. Run ./manage.py migrate to sync your database with the new setup.

Moved Connect screens (the text screen first seen when connecting) away from the database and into a module in gamesrc/world. This module allows for conveniently adding new connect screens on the fly. More than one screen in the given module will mean a random screen is used.
This commit is contained in:
Griatch 2011-04-12 21:43:57 +00:00
parent f1404356ea
commit 7f9f21f45e
21 changed files with 162 additions and 257 deletions

View file

@ -21,7 +21,7 @@ from src.utils.idmapper.models import SharedMemoryModel
from src.typeclasses.models import Attribute, TypedObject
from src.typeclasses.typeclass import TypeClass
from src.objects.manager import ObjectManager
from src.config.models import ConfigValue
from src.server.models import ServerConfig
from src.commands.cmdsethandler import CmdSetHandler
from src.scripts.scripthandler import ScriptHandler
from src.utils import logger
@ -666,7 +666,7 @@ class ObjectDB(TypedObject):
if self.home:
source_location = self.home
else:
default_home_id = ConfigValue.objects.conf(db_key="default_home")
default_home_id = ServerConfig.objects.conf("default_home")
default_home = ObjectDB.objects.get_id(default_home_id)
source_location = default_home
@ -743,7 +743,7 @@ class ObjectDB(TypedObject):
"""
# Gather up everything that thinks this is its location.
objs = ObjectDB.objects.filter(db_location=self)
default_home_id = int(ConfigValue.objects.conf('default_home'))
default_home_id = int(ServerConfig.objects.conf('default_home'))
try:
default_home = ObjectDB.objects.get(id=default_home_id)
except Exception: