Fixed a lingering error from turning off "quick assignment" that caused issues in TutorialWorld.
This commit is contained in:
parent
a1dc7451ef
commit
47356ca632
2 changed files with 10 additions and 4 deletions
|
|
@ -773,8 +773,8 @@ class Weapon(TutorialObject):
|
||||||
super(Weapon, self).at_object_creation()
|
super(Weapon, self).at_object_creation()
|
||||||
self.db.hit = 0.4 # hit chance
|
self.db.hit = 0.4 # hit chance
|
||||||
self.db.parry = 0.8 # parry chance
|
self.db.parry = 0.8 # parry chance
|
||||||
self.damage = 8.0
|
self.db.damage = 8.0
|
||||||
self.magic = False
|
self.db.magic = False
|
||||||
self.cmdset.add_default(CmdSetWeapon, permanent=True)
|
self.cmdset.add_default(CmdSetWeapon, permanent=True)
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
#__all__ = ("ObjAttribute", "Alias", "ObjectNick", "ObjectDB")
|
#__all__ = ("ObjAttribute", "Alias", "ObjectNick", "ObjectDB")
|
||||||
|
|
||||||
|
_ScriptDB = None
|
||||||
_AT_SEARCH_RESULT = variable_from_module(*settings.SEARCH_AT_RESULT.rsplit('.', 1))
|
_AT_SEARCH_RESULT = variable_from_module(*settings.SEARCH_AT_RESULT.rsplit('.', 1))
|
||||||
|
|
||||||
_GA = object.__getattribute__
|
_GA = object.__getattribute__
|
||||||
|
|
@ -900,6 +900,10 @@ class ObjectDB(TypedObject):
|
||||||
objects to their respective home locations, as well as clean
|
objects to their respective home locations, as well as clean
|
||||||
up all exits to/from the object.
|
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:
|
if _GA(self, "delete_iter") > 0:
|
||||||
# make sure to only call delete once on this object
|
# make sure to only call delete once on this object
|
||||||
# (avoid recursive loops)
|
# (avoid recursive loops)
|
||||||
|
|
@ -924,8 +928,10 @@ class ObjectDB(TypedObject):
|
||||||
_SA(_GA(self, "player"), "character", None)
|
_SA(_GA(self, "player"), "character", None)
|
||||||
_SA(self, "player", 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()
|
script.stop()
|
||||||
|
#for script in _GA(self, "scripts").all():
|
||||||
|
# script.stop()
|
||||||
|
|
||||||
# if self.player:
|
# if self.player:
|
||||||
# self.player.user.is_active = False
|
# self.player.user.is_active = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue