Added the ability to clear an object from the global cache. This is rarely
needed (and can be potentially dangerous if the object depends on certain startup methods to run and/or holds temporary attributes on themselves - these will all be lost due to a new instance being created. It is hoever necessary when it comes to renaming Exits - since the Command on the exit must then change name too, recaching the Exit will also update the command. Resolves issue 223.
This commit is contained in:
parent
91ec33b9a7
commit
464aa8ca9e
3 changed files with 38 additions and 28 deletions
|
|
@ -1015,6 +1015,9 @@ class CmdName(ObjManipCommand):
|
|||
if aliases:
|
||||
obj.aliases = aliases
|
||||
astring = " (%s)" % (", ".join(aliases))
|
||||
# fix for exits - we need their exit-command to change name too
|
||||
if obj.destination:
|
||||
obj.flush_from_cache()
|
||||
caller.msg("Object's name changed to '%s'%s." % (newname, astring))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue