Minor fixes to create command.

This commit is contained in:
Griatch 2011-10-16 00:40:11 +02:00
parent 70b4b559a5
commit 7195e1e773
2 changed files with 14 additions and 5 deletions

View file

@ -396,10 +396,10 @@ class CmdCreate(ObjManipCommand):
continue continue
if aliases: if aliases:
string = "You create a new %s: %s (aliases: %s)." string = "You create a new %s: %s (aliases: %s)."
string = string % (obj.typeclass, obj.name, ", ".join(aliases)) string = string % (obj.typeclass.typename, obj.name, ", ".join(aliases))
else: else:
string = "You create a new %s: %s." string = "You create a new %s: %s."
string = string % (obj.typeclass, obj.name) string = string % (obj.typeclass.typename, obj.name)
# set a default desc # set a default desc
if not obj.db.desc: if not obj.db.desc:
obj.db.desc = "You see nothing special." obj.db.desc = "You see nothing special."
@ -1664,7 +1664,7 @@ class CmdFind(MuxCommand):
find objects find objects
Usage: Usage:
@find[/switches] <name or dbref or *player> [= dbrefmin[ dbrefmax]] @find[/switches] <name or dbref or *player> [= dbrefmin[-dbrefmax]]
Switches: Switches:
room - only look for rooms (location=None) room - only look for rooms (location=None)
@ -1673,7 +1673,7 @@ class CmdFind(MuxCommand):
Searches the database for an object of a particular name or dbref. Searches the database for an object of a particular name or dbref.
Use *playername to search for a player. The switches allows for Use *playername to search for a player. The switches allows for
limiting matches to certain game entities. Dbrefmin and dbrefmax limiting object matches to certain game entities. Dbrefmin and dbrefmax
limits matches to within the given dbrefs, or above/below if only one is given. limits matches to within the given dbrefs, or above/below if only one is given.
""" """
@ -1688,7 +1688,7 @@ class CmdFind(MuxCommand):
switches = self.switches switches = self.switches
if not self.args: if not self.args:
caller.msg("Usage: @find <string> [= low [high]]") caller.msg("Usage: @find <string> [= low [-high]]")
return return
searchstring = self.lhs searchstring = self.lhs

View file

@ -72,6 +72,15 @@ class Player(TypeClass):
# regardless of which character is currently # regardless of which character is currently
# connected to this player. # connected to this player.
def at_cmdset_get(self):
"""
Called just before cmdsets on this player are requested by the
command handler. If changes need to be done on the fly to the cmdset
before passing them on to the cmdhandler, this is the place to do it.
This is called also if the player currently have no cmdsets.
"""
pass
def at_first_login(self): def at_first_login(self):
""" """
Only called once, the very first Only called once, the very first