From c5fe6fff538439b14a04a180f8b3cb2def2df777 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 1 May 2019 15:14:46 +0200 Subject: [PATCH] Add missing callbacks-handler to ingame_python classes --- evennia/contrib/ingame_python/typeclasses.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/evennia/contrib/ingame_python/typeclasses.py b/evennia/contrib/ingame_python/typeclasses.py index 3f52b982bf..e49f64be38 100644 --- a/evennia/contrib/ingame_python/typeclasses.py +++ b/evennia/contrib/ingame_python/typeclasses.py @@ -179,6 +179,11 @@ class EventCharacter(DefaultCharacter): "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): """ Called if the move is to be announced. This is @@ -602,6 +607,11 @@ class EventExit(DefaultExit): "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): """ This hook is responsible for handling the actual traversal, @@ -862,6 +872,11 @@ class EventRoom(DefaultRoom): "unpuppeted_in": (["character", "room"], ROOM_UNPUPPETED_IN), } + @lazy_property + def callbacks(self): + """Return the CallbackHandler.""" + return CallbackHandler(self) + def at_object_delete(self): """ Called just before the database object is permanently