Add missing callbacks-handler to ingame_python classes

This commit is contained in:
Griatch 2019-05-01 15:14:46 +02:00
parent 07a941c881
commit c5fe6fff53

View file

@ -179,6 +179,11 @@ class EventCharacter(DefaultCharacter):
"unpuppeted": (["character"], CHARACTER_UNPUPPETED), "unpuppeted": (["character"], CHARACTER_UNPUPPETED),
} }
@lazy_property
def callbacks(self):
"""Return the CallbackHandler."""
return CallbackHandler(self)
def announce_move_from(self, destination, msg=None, mapping=None): def announce_move_from(self, destination, msg=None, mapping=None):
""" """
Called if the move is to be announced. This is Called if the move is to be announced. This is
@ -602,6 +607,11 @@ class EventExit(DefaultExit):
"traverse": (["character", "exit", "origin", "destination"], EXIT_TRAVERSE), "traverse": (["character", "exit", "origin", "destination"], EXIT_TRAVERSE),
} }
@lazy_property
def callbacks(self):
"""Return the CallbackHandler."""
return CallbackHandler(self)
def at_traverse(self, traversing_object, target_location): def at_traverse(self, traversing_object, target_location):
""" """
This hook is responsible for handling the actual traversal, This hook is responsible for handling the actual traversal,
@ -862,6 +872,11 @@ class EventRoom(DefaultRoom):
"unpuppeted_in": (["character", "room"], ROOM_UNPUPPETED_IN), "unpuppeted_in": (["character", "room"], ROOM_UNPUPPETED_IN),
} }
@lazy_property
def callbacks(self):
"""Return the CallbackHandler."""
return CallbackHandler(self)
def at_object_delete(self): def at_object_delete(self):
""" """
Called just before the database object is permanently Called just before the database object is permanently