Scripts and Exits updated. Fixed some deep issues with Scripts that caused object-based scripts to not properly shut down in some situations, as well as spawn multiple instances of themselves. I think this should resolve all "at_repeat doubling" issues reported. Due to optimizations in the typeclass cache loader in a previous update, the Exit cmdsets were not properly loaded (they were loaded at cache time, which now doesn't happen as often). So Exits instead rely on the new "at_cmdset_get" hook called by the cmdhandler. It allows dynamic modification of cmdsets just before they are accessed. Resolves issue173 (I hope). Resolves issue180. Resolves issue 181.

This commit is contained in:
Griatch 2011-08-11 21:16:35 +00:00
parent 16affc284b
commit 2b4e008d18
13 changed files with 135 additions and 68 deletions

View file

@ -22,7 +22,7 @@ from twisted.internet import protocol, reactor, defer
from twisted.web import server, static
from django.db import connection
from django.conf import settings
from src.utils import reloads
from src.scripts.models import ScriptDB
from src.server.models import ServerConfig
from src.server.sessionhandler import SESSIONS
from src.server import initial_setup
@ -99,7 +99,7 @@ class Evennia(object):
channelhandler.CHANNELHANDLER.update()
# init all global scripts
reloads.reload_scripts(init_mode=True)
ScriptDB.objects.validate(init_mode=True)
# Make info output to the terminal.
self.terminal_output()

View file

@ -182,7 +182,7 @@ class SessionBase(object):
self.log('Logged in: %s' % self)
# start (persistent) scripts on this object
reloads.reload_scripts(obj=self.player.character, init_mode=True)
reloads.reload_scripts(obj=self.player.character)
#add session to connected list
SESSIONS.add_loggedin_session(self)