evennia.contrib.tutorial_examples.mirror

TutorialMirror

A simple mirror object to experiment with.

class evennia.contrib.tutorial_examples.mirror.TutorialMirror(*args, **kwargs)[source]

Bases: evennia.objects.objects.DefaultObject

A simple mirror object that - echoes back the description of the object looking at it - echoes back whatever is being sent to its .msg - to the

sender, if given, otherwise to the location of the mirror.

return_appearance(looker, **kwargs)[source]

This formats the description of this object. Called by the ‘look’ command.

Parameters
  • looker (Object) – Object doing the looking.

  • **kwargs (dict) – Arbitrary, optional arguments for users overriding the call (unused by default).

msg(text=None, from_obj=None, **kwargs)[source]

Simply override .msg to echo back to the messenger or to the current location.

Parameters
  • text (str or tuple, optional) – The message to send. This is treated internally like any send-command, so its value can be a tuple if sending multiple arguments to the text oob command.

  • from_obj (obj or iterable) – given, at_msg_send will be called. This value will be passed on to the protocol. If iterable, will execute hook on all entities in it.

exception DoesNotExist

Bases: evennia.objects.objects.DefaultObject.DoesNotExist

exception MultipleObjectsReturned

Bases: evennia.objects.objects.DefaultObject.MultipleObjectsReturned

path = 'evennia.contrib.tutorial_examples.mirror.TutorialMirror'
typename = 'TutorialMirror'