mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Merge pull request #2192 from davewiththenicehat/master
gendersub msg method removed positional argument
This commit is contained in:
commit
a1410ef30f
1 changed files with 5 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ class GenderCharacter(DefaultCharacter):
|
|||
pronoun = _GENDER_PRONOUN_MAP[gender][typ.lower()]
|
||||
return pronoun.capitalize() if typ.isupper() else pronoun
|
||||
|
||||
def msg(self, text, from_obj=None, session=None, **kwargs):
|
||||
def msg(self, text=None, from_obj=None, session=None, **kwargs):
|
||||
"""
|
||||
Emits something to a session attached to the object.
|
||||
Overloads the default msg() implementation to include
|
||||
|
|
@ -141,6 +141,10 @@ class GenderCharacter(DefaultCharacter):
|
|||
All extra kwargs will be passed on to the protocol.
|
||||
|
||||
"""
|
||||
if text is None:
|
||||
super().msg(from_obj=from_obj, session=session, **kwargs)
|
||||
return
|
||||
|
||||
try:
|
||||
if text and isinstance(text, tuple):
|
||||
text = (_RE_GENDER_PRONOUN.sub(self._get_pronoun, text[0]), *text[1:])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue