Removed deprecated Attribute methods from evennia distro. Removed MUX help files.
This commit is contained in:
parent
9620867031
commit
8bd431b385
13 changed files with 47 additions and 65 deletions
|
|
@ -97,7 +97,7 @@ _LOGGER = None
|
|||
#------------------------------------------------------------
|
||||
|
||||
# specifically forbidden symbols
|
||||
_EV_UNALLOWED_SYMBOLS = ["attr", "set_attribute", "delete"]
|
||||
_EV_UNALLOWED_SYMBOLS = ["attr", "attributes", "delete"]
|
||||
try: _EV_UNALLOWED_SYMBOLS.expand(settings.EVLANG_UNALLOWED_SYMBOLS)
|
||||
except AttributeError: pass
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ class Evlang(object):
|
|||
if scripts:
|
||||
self.evlang_scripts.update(scripts)
|
||||
if self.obj:
|
||||
self.evlang_scripts.update(obj.attr(storage_attr))
|
||||
self.evlang_scripts.update(obj.attributes.get(storage_attr))
|
||||
self.safe_context = _EV_SAFE_CONTEXT # set by default + settings
|
||||
if safe_context:
|
||||
self.safe_context.update(safe_context)
|
||||
|
|
@ -401,7 +401,7 @@ class Evlang(object):
|
|||
self.evlang_scripts[scriptname] = (codestring, scripter)
|
||||
if self.obj:
|
||||
# save to database
|
||||
self.obj.attr(self.evlang_storage_attr, self.evlang_scripts)
|
||||
self.obj.attributes.add(self.evlang_storage_attr, self.evlang_scripts)
|
||||
|
||||
def delete(self, scriptname):
|
||||
"""
|
||||
|
|
@ -411,7 +411,7 @@ class Evlang(object):
|
|||
del self.evlang_scripts[scriptname]
|
||||
if self.obj:
|
||||
# update change to database
|
||||
self.obj.attr(self.evlang_storage_attr, self.evlang_scripts)
|
||||
self.obj.attributes.add(self.evlang_storage_attr, self.evlang_scripts)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -642,7 +642,7 @@ class CmdEditor(Command):
|
|||
return target and str(target) or ""
|
||||
def save_attr():
|
||||
"Save line buffer to given attribute name. This should return True if successful and also report its status."
|
||||
self.obj.set_attribute(self.attrname, self.editor.buffer)
|
||||
self.obj.attributes.add(self.attrname, self.editor.buffer)
|
||||
self.caller.msg("Saved.")
|
||||
return True
|
||||
def quit_hook():
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ class CmdGetWeapon(Command):
|
|||
"Implement the command"
|
||||
|
||||
rack_id = self.obj.db.rack_id
|
||||
if self.caller.get_attribute(rack_id):
|
||||
if self.caller.attributes.get(rack_id):
|
||||
# we don't allow a player to take more than one weapon from rack.
|
||||
self.caller.msg("%s has no more to offer you." % self.obj.name)
|
||||
else:
|
||||
|
|
@ -826,7 +826,7 @@ class CmdGetWeapon(Command):
|
|||
else:
|
||||
self.caller.msg(ostring)
|
||||
# tag the caller so they cannot keep taking objects from the rack.
|
||||
self.caller.set_attribute(rack_id, True)
|
||||
self.caller.attributes.add(rack_id, True)
|
||||
|
||||
|
||||
class CmdSetWeaponRack(CmdSet):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue