mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 22:47:16 +02:00
Merge.
This commit is contained in:
commit
406800f254
8 changed files with 60 additions and 30 deletions
|
|
@ -35,7 +35,7 @@ from django.utils.translation import ugettext as _
|
|||
|
||||
#__all__ = ("ObjAttribute", "Alias", "ObjectNick", "ObjectDB")
|
||||
|
||||
|
||||
_ScriptDB = None
|
||||
_AT_SEARCH_RESULT = variable_from_module(*settings.SEARCH_AT_RESULT.rsplit('.', 1))
|
||||
|
||||
_GA = object.__getattribute__
|
||||
|
|
@ -932,6 +932,10 @@ class ObjectDB(TypedObject):
|
|||
objects to their respective home locations, as well as clean
|
||||
up all exits to/from the object.
|
||||
"""
|
||||
global _ScriptDB
|
||||
if not _ScriptDB:
|
||||
from src.scripts.models import ScriptDB as _ScriptDB
|
||||
|
||||
if _GA(self, "delete_iter") > 0:
|
||||
# make sure to only call delete once on this object
|
||||
# (avoid recursive loops)
|
||||
|
|
@ -956,8 +960,10 @@ class ObjectDB(TypedObject):
|
|||
_SA(_GA(self, "player"), "character", None)
|
||||
_SA(self, "player", None)
|
||||
|
||||
for script in _GA(self, "scripts").all():
|
||||
for script in _ScriptDB.objects.get_all_scripts_on_obj(self):
|
||||
script.stop()
|
||||
#for script in _GA(self, "scripts").all():
|
||||
# script.stop()
|
||||
|
||||
# if self.player:
|
||||
# self.player.user.is_active = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue