diff --git a/evennia/commands/command.py b/evennia/commands/command.py index 535ce15dd9..c99de48ac0 100644 --- a/evennia/commands/command.py +++ b/evennia/commands/command.py @@ -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() diff --git a/evennia/commands/default/muxcommand.py b/evennia/commands/default/muxcommand.py index d288f5f980..797dd6e39d 100644 --- a/evennia/commands/default/muxcommand.py +++ b/evennia/commands/default/muxcommand.py @@ -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() )