From 7195e1e77398527f8b8841e1b0e49cca11b1a3d6 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 16 Oct 2011 00:40:11 +0200 Subject: [PATCH] Minor fixes to create command. --- src/commands/default/building.py | 10 +++++----- src/players/player.py | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index 2c98babbe..495e5c63e 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -396,10 +396,10 @@ class CmdCreate(ObjManipCommand): continue if aliases: 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: string = "You create a new %s: %s." - string = string % (obj.typeclass, obj.name) + string = string % (obj.typeclass.typename, obj.name) # set a default desc if not obj.db.desc: obj.db.desc = "You see nothing special." @@ -1664,7 +1664,7 @@ class CmdFind(MuxCommand): find objects Usage: - @find[/switches] [= dbrefmin[ dbrefmax]] + @find[/switches] [= dbrefmin[-dbrefmax]] Switches: 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. 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. """ @@ -1688,7 +1688,7 @@ class CmdFind(MuxCommand): switches = self.switches if not self.args: - caller.msg("Usage: @find [= low [high]]") + caller.msg("Usage: @find [= low [-high]]") return searchstring = self.lhs diff --git a/src/players/player.py b/src/players/player.py index 0d8da1d47..502321e1b 100644 --- a/src/players/player.py +++ b/src/players/player.py @@ -72,6 +72,15 @@ class Player(TypeClass): # regardless of which character is currently # 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): """ Only called once, the very first