Archived
architecture cleanup
This commit is contained in:
@@ -7,7 +7,7 @@ class Serializable:
|
||||
|
||||
uuid: UUID
|
||||
|
||||
listeners: List[Callable[[str, dict], Awaitable[Any]]]
|
||||
listeners: List[Callable[[str, dict, Callable], Awaitable[Any]]]
|
||||
|
||||
def __init__(self):
|
||||
self.uuid = uuid4()
|
||||
@@ -26,6 +26,7 @@ class Serializable:
|
||||
self,
|
||||
notification_type: str,
|
||||
game_object: dict,
|
||||
client_filter: Callable = lambda _: True,
|
||||
):
|
||||
for l in self.listeners:
|
||||
await l(notification_type, game_object)
|
||||
await l(notification_type, game_object, client_filter)
|
||||
|
||||
Reference in New Issue
Block a user