From 93aae906bff10ae3b9119cc08f0074e063e1622f Mon Sep 17 00:00:00 2001 From: Andrew Bastien Date: Mon, 11 Jul 2022 21:52:52 -0400 Subject: [PATCH] Improving documentation. --- evennia/objects/objects.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/evennia/objects/objects.py b/evennia/objects/objects.py index 0497152258..b5a2c8d338 100644 --- a/evennia/objects/objects.py +++ b/evennia/objects/objects.py @@ -858,10 +858,11 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase): move_hooks (bool): If False, turn off the calling of move-related hooks (at_pre/post_move etc) with quiet=True, this is as quiet a move as can be done. - move_type (str): Will be used for generating the text tuple {"type": move_type}, - and can be used for log filtering in hooks. Evennia has only a few - move_types for move_to to start with, like "teleport", "traverse", - "get", "give", and "drop". + move_type (str): The "kind of move" being performed, such as "teleport", "traverse", + "get", "give", or "drop". The value can be arbitrary. By default, it only affects + the text message generated by announce_move_to and announce_move_from by defining + their {"type": move_type} for outgoing text. This can be used for altering + messages and/or overloaded hook behaviors. Keyword Args: Passed on to announce_move_to and announce_move_from hooks. @@ -1513,6 +1514,9 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase): msg (str, optional): a replacement message. mapping (dict, optional): additional mapping objects. move_type (str): The type of move. "give", "traverse", etc. + This is an arbitrary string provided to obj.move_to(). + Useful for altering messages or altering logic depending + on the kind of movement. **kwargs (dict): Arbitrary, optional arguments for users overriding the call (unused by default). @@ -1560,6 +1564,9 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase): msg (str, optional): the replacement message if location. mapping (dict, optional): additional mapping objects. move_type (str): The type of move. "give", "traverse", etc. + This is an arbitrary string provided to obj.move_to(). + Useful for altering messages or altering logic depending + on the kind of movement. **kwargs (dict): Arbitrary, optional arguments for users overriding the call (unused by default). @@ -1655,6 +1662,9 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase): source_location (Object): Where `moved_object` came from. Note that this could be `None`. move_type (str): The type of move. "give", "traverse", etc. + This is an arbitrary string provided to obj.move_to(). + Useful for altering messages or altering logic depending + on the kind of movement. **kwargs (dict): Arbitrary, optional arguments for users overriding the call (unused by default).