Change text optional kwarg type name to lowercase to match all other communications variables. Expand msg_contents to handle a tuple.

This commit is contained in:
Griatch 2017-03-29 21:50:51 +02:00
parent c12306ff72
commit f6e230f1a6
2 changed files with 33 additions and 16 deletions

View file

@ -417,7 +417,7 @@ class CmdSay(COMMAND_DEFAULT_CLASS):
# Build the string to emit to neighbors.
emit_string = '%s says, "%s|n"' % (caller.name, speech)
caller.location.msg_contents((emit_string, {"type": "Say"}),
caller.location.msg_contents(text=(emit_string, {"type": "say"}),
exclude=caller, from_obj=caller)
@ -460,7 +460,7 @@ class CmdWhisper(COMMAND_DEFAULT_CLASS):
# Build the string to emit to receiver.
emit_string = '%s whispers, "%s|n"' % (caller.name, speech)
receiver.msg((emit_string, {"type": "Whisper"}), from_obj=caller)
receiver.msg(text=(emit_string, {"type": "whisper"}), from_obj=caller)
class CmdPose(COMMAND_DEFAULT_CLASS):
@ -503,7 +503,7 @@ class CmdPose(COMMAND_DEFAULT_CLASS):
self.caller.msg(msg)
else:
msg = "%s%s" % (self.caller.name, self.args)
self.caller.location.msg_contents((msg, {"type": "Pose"}),
self.caller.location.msg_contents(text=(msg, {"type": "pose"}),
from_obj=self.caller)