Made sure the cmd-classes for 'home' and '@home' were differently named, which messed up their appearance in ev. Resolves Issue 285.

This commit is contained in:
Griatch 2012-10-14 16:03:02 +02:00
parent cd5623a657
commit 86a44ab84d
3 changed files with 4 additions and 14 deletions

View file

@ -14,7 +14,7 @@ from src.commands.cmdhandler import get_and_merge_cmdsets
__all__ = ("ObjManipCommand", "CmdSetObjAlias", "CmdCopy",
"CmdCpAttr", "CmdMvAttr", "CmdCreate", "CmdDebug",
"CmdDesc", "CmdDestroy", "CmdDig", "CmdTunnel", "CmdLink",
"CmdUnLink", "CmdHome", "CmdListCmdSets", "CmdName",
"CmdUnLink", "CmdSetHome", "CmdListCmdSets", "CmdName",
"CmdOpen", "CmdSetAttribute", "CmdTypeclass", "CmdWipe",
"CmdLock", "CmdExamine", "CmdFind", "CmdTeleport",
"CmdScript")
@ -900,7 +900,7 @@ class CmdUnLink(CmdLink):
# call the @link functionality
super(CmdUnLink, self).func()
class CmdHome(CmdLink):
class CmdSetHome(CmdLink):
"""
@home - control an object's home location
@ -916,6 +916,7 @@ class CmdHome(CmdLink):
"""
key = "@home"
aliases = "@sethome"
locks = "cmd:perm(@home) or perm(Builders)"
help_category = "Building"

View file

@ -76,7 +76,7 @@ class DefaultCmdSet(CmdSet):
self.add(building.CmdTypeclass())
self.add(building.CmdLock())
self.add(building.CmdScript())
self.add(building.CmdHome())
self.add(building.CmdSetHome())
# Batchprocessor commands
self.add(batchprocess.CmdBatchCommands())

View file

@ -86,17 +86,6 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
return None
return dbref
#@returns_typeclass_list
#def get_with_attr(self, attribute_name, attribute_value=None):
# """
# Returns the typeclassed entity depending on having a given attribute.
# attribute_name - only entities with an attribute of this name will be included in match
# attribute_value - if != None, only entities with db.attribute_name=attribute_value will match.
# """
# self.filter() #TODO not implemented
@returns_typeclass
def get_id(self, dbref):
"""