Merge branch 'command_info' of https://github.com/volundmush/evennia into volundmush-command_info
This commit is contained in:
commit
bec5c16bf7
3 changed files with 42 additions and 9 deletions
|
|
@ -202,11 +202,15 @@ class MuxCommand(Command):
|
|||
else:
|
||||
self.character = None
|
||||
|
||||
def func(self):
|
||||
def get_command_info(self):
|
||||
"""
|
||||
This is the hook function that actually does all the work. It is called
|
||||
by the cmdhandler right after self.parser() finishes, and so has access
|
||||
to all the variables defined therein.
|
||||
Update of parent class's get_command_info() for MuxCommand.
|
||||
"""
|
||||
self.get_command_info()
|
||||
|
||||
def get_command_info(self):
|
||||
"""
|
||||
Update of parent class's get_command_info() for MuxCommand.
|
||||
"""
|
||||
variables = "\n".join(
|
||||
" |w{}|n ({}): {}".format(key, type(val), val) for key, val in self.__dict__.items()
|
||||
|
|
@ -245,6 +249,14 @@ Command {self} has no defined `func()` - showing on-command variables: No child
|
|||
string += "-" * 50
|
||||
self.caller.msg(string)
|
||||
|
||||
def func(self):
|
||||
"""
|
||||
This is the hook function that actually does all the work. It is called
|
||||
by the cmdhandler right after self.parser() finishes, and so has access
|
||||
to all the variables defined therein.
|
||||
"""
|
||||
self.get_command_info()
|
||||
|
||||
|
||||
class MuxAccountCommand(MuxCommand):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue