mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 07:16:31 +01:00
Segmenting the Command methods better.
This commit is contained in:
parent
e09be824ca
commit
597a0dbee2
2 changed files with 15 additions and 0 deletions
|
|
@ -408,6 +408,15 @@ class Command(object, metaclass=CommandMeta):
|
|||
module for which object properties are available (beyond those
|
||||
set in self.parse())
|
||||
|
||||
"""
|
||||
self.get_command_info()
|
||||
|
||||
def get_command_info(self):
|
||||
"""
|
||||
This is the default output of func() if no func() overload is done.
|
||||
Provided here as a separate method so that it can be called for debugging
|
||||
purposes when making commands.
|
||||
|
||||
"""
|
||||
variables = "\n".join(
|
||||
" |w{}|n ({}): {}".format(key, type(val), val) for key, val in self.__dict__.items()
|
||||
|
|
|
|||
|
|
@ -208,6 +208,12 @@ class MuxCommand(Command):
|
|||
by the cmdhandler right after self.parser() finishes, and so has access
|
||||
to all the variables defined therein.
|
||||
"""
|
||||
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()
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue