Default Commands now use self.msg() instead of self.caller.msg() #3349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief overview of PR changes/additions
The Evennia default command has a handy self.msg() which has some unique behavior not found on objects, sessions, and accounts.
Unfortunately, many commands aren't using it, instead going straight for self.caller.msg()
This fixes that, where prudent. The only command I didn't touch is the CmdPy-related things, because that does some special weird stuff I don't want to mess up.
Motivation for adding to Evennia
Twofold. First, the Default commands should better conform to their own standards and resources to show off how to write commands.
Second, I have an awesome output-buffering system for Athanor in the works (which we may be able to backport to Evennia later) which bundles up all calls to cmd.msg() for a single operation so that webclients can group up the output of a specific command with the input. So, I need the default commands to be using cmd.msg(), or I need to replace all of them...
Like, if you sent in:
["text", ["look"], {"results_id": "whatever"}]
Then you will get a response back that looks something like this:
["results", [{"look": (["<text>"], {"type": "look"})], {"results_id": "whatever"}]
Other info (issues closed, discussion etc)
There seems to be a weird recursion issue going on with CmdExamine. I'm not sure how to deal with it yet, still investigating.